2010/1/22 senling <senthilu...@gmail.com>: > Hi, > I am adding login functionality to my app which has two controllers > users and photos and i am having some trouble. > > In my users/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 "users/index"%> > <%end%> > > Routes: > map.root :controller => 'user', :action => 'surahome'
Should that be 'users'? > > > > When i login to the page, it redirects to http://www.example.com/photos > and the page displays correctly. > > When i access the main url http://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.