Controller name user. I have changed to user/index, still same error.
Development.log: **************** Processing UserController#index (for 192.168.1.5 at 2010-01-23 00:09:08) [GET] Rendering template within layouts/standard Rendering user/index ActionView::TemplateError (Missing template sandbox/_index.erb in view path app/views) on line #4 of app/views/user/index.html.erb: 1: <title>Sura Systems</title> 2: 3: <%if logged_in? %> 4: <%=render "sandbox/index"%> 5: <%else%> 6: 7: <div id="content"> app/views/user/index.html.erb:4 /usr/lib/ruby/1.8/thread.rb:135:in `synchronize' fcgi (0.8.7) lib/fcgi.rb:117:in `session' fcgi (0.8.7) lib/fcgi.rb:104:in `each_request' fcgi (0.8.7) lib/fcgi.rb:36:in `each' dispatch.fcgi:24 Rendered rescues/_trace (143.9ms) Rendered rescues/_request_and_response (0.5ms) Rendering rescues/layout (internal_server_error) ***************************************************************************** On Jan 22, 4:19 pm, Colin Law <clan...@googlemail.com> wrote: > 2010/1/22 senling <senthilu...@gmail.com>: > > > > > Hi, > > I am adding login functionality to my app which has two controllers > > user and photos and i am having some trouble. > > > In my user/index view > > > <%if logged_in? %> > > <%=render "photos/index"%> > > <%else%> > > .... Home page With login..... > > <%end%> > > > In my photos/index view > > > <%if logged_in? %> > > .... Welcome page ..... > > > <%else%> > > <%=render "user/index"%> > > <%end%> > > > Routes: > > map.root :controller => 'user', :action => 'index' > > Should that be 'users'? > > > > > When i login to the page, it redirects tohttp://www.example.com/photos > > and the page displays correctly. > > > When i access the main urlhttp://www.example.com > > > i got this error : Missing template photos/_index.erb in view path > > app/views > > What do you see in development.log when you do this? > > Colin -- 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-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.