I am using a datatable in my rails3.1 app and it works, until I try and use a routing path for one of the returned fields (second last field). It doesn;t matter what valid routing path I use, I receive the error NoMethodError (undefined method 'active_toggle_user_path' for #<UsersDatatable:0x007f9d16cf0188>):
Any suggestions?
def data
users.map do |user|
[
link_to(user.last_name, user),
user.first_name,
user.username,
user.email,
user.security_role,
user.last_login_at,
user.active == true ? 'Disable' : link_to('Enable', active_toggle_user_path(user, :toggle => true), { :confirm => 'Are you sure you want to ENABLE this User?', :class => "enable" }),
'Delete User?'
]
end
end