Hi i given in routes.rb as
map.resources :students, :member => [:departments => :get]
and rhtml i given link
<td><%=link_to "Departments",
departments_student_url(student)
%></td>
in students controller
def departments
@student= Student.find params[:id]
# @departments = @student.departments
end
when i click the departments link it showing error like
undefined method `departments_student_url'' for
#<ActionView::Base:0xb73d2f18>
what''s a problem?
please sujjest any good link to study RESTful architecture in detail and
also in depth?
with regards
babu nair
--
Posted via http://www.ruby-forum.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
-~----------~----~----~----~------~----~------~--~---
try department_student_url(studen) On Fri, Aug 1, 2008 at 1:41 PM, babu nair <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>wrote:> > Hi i given in routes.rb as > > map.resources :students, :member => [:departments => :get] > > and rhtml i given link > > <td><%=link_to "Departments", departments_student_url(student) > %></td> > > in students controller > > def departments > @student= Student.find params[:id] > # @departments = @student.departments > end > > when i click the departments link it showing error like > > undefined method `departments_student_url'' for > #<ActionView::Base:0xb73d2f18> > > what''s a problem? > > please sujjest any good link to study RESTful architecture in detail and > also in depth? > > with regards > babu nair > -- > Posted via http://www.ruby-forum.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 -~----------~----~----~----~------~----~------~--~---
Sounds like it should be a nested resource, not it''s own action. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---