RubyOnRails: Create a Controller and Views for it using a single command

On February 6, 2011, in Rails, Ruby, by Dipin Krishna

Lets create a controller named ‘home‘ with ¬†views ‘index‘, ‘view2′ view3′. Fortunately, you can do that in a single command. Enter this command in your terminal: $ rails generate controller home index view2 view3 Rails will create several files for you, including app/views/home/index.html.erb. This is the template that will be used to display the results […]

Tagged with:  

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...