Ruby on Rails Saturday, July 3, 2010

Quoting Karen Kalashyan <karenishe@gmail.com>:
> I'm new in RoR:)
>
> I have controller and view (/app/controllers/greeting_controller.rb
> and /app/views/greeting/index.rhtml /.erb/.html.erb - doesn't match).
>

You don't say which version of Rails you are using, so I will assume 2.x. If
1.x or 3.x, ignore this reply.

greeting_controller.rb and index.rhtml look fine. But they are not following
Rails naming conventions, controller names are plural, i.e.,
greetings_controller.rb and /app/views/greetings/. index.rhtml is old style
naming, preferred current practice is index.html.erb. These two changes may
be enough to solve your problem.

I don't understand the last bit of the sentence above. Please expand what you
mean by "/.erb/.html.erb - doesn't match". Do you mean that
/app/view/greeting/index.erb and /app/view/greeting/index.html.erb are ignored
by the template engine?

HTH,
Jeffrey

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment