Tag helper

9 votes

1 comments

3369 views

Move code into helper

According to MVC architecture, there should not be logic codes in view, in this practice, I will introduce you to move codes into helper.

implemented
by ihower
ihower

9 votes

4 comments

5148 views

Generate polymorphic url

If you want to generate different urls according to different objects, you should use the polymorphic_path/polymorphic_url to simplify the url generation.

flyerhzm

10 votes

10 comments

4467 views

Substituting before_filter :load_object

Instead of loading an object with a before_filter you can use a more intelligent helper_method to get the main object for the controller context.

by dbloete
dbloete

13 votes

6 comments

5302 views

Remove empty helpers

If you use rails generator to create scaffolds or controllers, it will also create some helpers, most of the helpers are useless, just remove them.

implemented
flyerhzm
Fork me on GitHub