Using Helpers in Rails Applications

What is a helper

Helper is a module containing methods that assist a view. Helper methods are used to generate HTML, XML or Javascript. So, the helper extends the behavior of a template.

Each controller gets its own helper module. If the controller is named BlogController, then Rails will look for the helper BlogHelper in the file blog_helper.rb. However, this is generated automatically using the controller generation script.

Advertisements

One thought on “Using Helpers in Rails Applications

  1. Pingback: Helper | English Language Tutorials

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