How do I run multiple lines of Ruby in html.erb file
If you need extra functions in your view, you normally declare those inside a helper. For each controller, if there is a helper it is automatically loaded. For instance, if you have a PeopleController, in the app/helpers folder, there should be a people_helper.rb, and it should look like this module PeopleHelper def name #do something … Read more