Hello , I am using Rails 1.2.2 and Ruby 1.8.5. According to what i have read rails redirects the request to a view with the same name as the controller. This is supposed to work even if you don''t explicitly give a render :template => call in your controller. But some how this is not working. I have store_controller.rb in controllers and store.rthml in layouts . Yet Rails is complaining about a missing template. am i missing something here ? Thanks --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> According to what i have read rails redirects the request to a view > with the same name as the controller.<...> Well it is action, not controller. In case when action is not specified Rails will use ''index'' as default.> I have store_controller.rb in controllers and store.rthml in layouts . > Yet Rails is complaining about a missing template. > am i missing something here ?Yep, your are missing app/views/store/index.rhtml ;) Regards, Rimantas -- http://rimantas.com/ --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hello Rimantas, Yes i am trying out the depot example from the rails book. But i do have a index action in the store_controller.rb and also app/ views/store/index.rhtml Also i am trying to use /app/views/layouts/store.rthml for creating the layout. yet i am getting the error. any ideas? Thanks On Mar 1, 3:58 pm, "Rimantas Liubertas" <riman...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > According to what i have read rails redirects the request to a view > > with the same name as the controller. > > <...> > > Well it is action, not controller. In case when action is not > specified Rails will > use ''index'' as default. > > > I have store_controller.rb in controllers and store.rthml in layouts . > > Yet Rails is complaining about a missing template. > > am i missing something here ? > > Yep, your are missing app/views/store/index.rhtml ;) > > Regards, > Rimantas > --http://rimantas.com/--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
<...>> Also i am trying to use /app/views/layouts/store.rthml for creating > the layout. > > yet i am getting the error. any ideas?Well, weird, unless your file indeed has "rthml" extension. It should be "rhtml" - "t" and "h" are swapped :) Regards, Rimantas -- http://rimantas.com/ --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hello Rimantas, oops :) am extremely sorry for this . i failed to notice something so obvious. yes its working fine now. Thanks. On Mar 1, 4:23 pm, "Rimantas Liubertas" <riman...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> <...> > > > Also i am trying to use /app/views/layouts/store.rthml for creating > > the layout. > > > yet i am getting the error. any ideas? > > Well, weird, unless your file indeed has "rthml" extension. It should > be "rhtml" - > "t" and "h" are swapped :) > > Regards, > Rimantas > --http://rimantas.com/--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---