Template is missing error.

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

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 :wink:

Regards, Rimantas

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

<...>

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 :slight_smile:

Regards, Rimantas

Hello Rimantas,

oops :slight_smile: am extremely sorry for this . i failed to notice something so obvious. yes its working fine now.

Thanks.