Hidden Counter in partials

Some time we need counter in inside partials , so rails provides an iteration counter automatically to template which can be easily accessed with partial name and counter means “partial_file_name_counter” thus the easy way to deal with counter in partial files …

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s