I\'m pretty new in Rails. Sorry for the noob question.
I\'ve create a new controller: rails new controller Say hello goodbye
How can i add a new
def hello
@hello = "hello"
end
def goodbye
@goodbye = "goodbye"
end
then in /config/routes.rb
get 'foo/hello' ## foo is the name of your controller
get 'foo/goodbye'
Remember to create the views too:
views/foo/hello.html.erb
that may look like this:
Say <%= @hello %>
views/foo/goodbye.html.erb
that may look like this:
Say <%= @goodbye %>