How would I call that method in the index.html.erb?
When learning ruby it just said to run the whatever.rb in the terminal
to run what ever code you wrote within that file. Just curious on how
that
would work with rails.
How would I call that method in the index.html.erb?
What do you mean by calling a method of the controller from a view?
Controller methods are generally actions that map to urls so you would
link to the action in the view, so the user invokes that action when
he clicks the link.
If you have not already done so I would recommend working through the
Getting Started guide at http://guides.rubyonrails.org/. Also look at
the other guides. The railscast videos are also excellent.
Colin
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.