REST error

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)

%>

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

try department_student_url(studen)

On Fri, Aug 1, 2008 at 1:41 PM, babu nair

Sounds like it should be a nested resource, not it’s own action.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs