Displaying 1 result from an estimated 1 matches for "new_projects_path".
Did you mean:
new_project_path
2010 May 13
1
link_to using smart API
...class instead, like
this, sense in this case the class itself should carry enough
information to generate the path?
def create_link(object, label = nil)
label ||= auth_labels[:new]
link = link_to(label, [:new, object.class]) if can?(:create,
object)
end
But then I get:
undefined method `new_projects_path'' for #<#<Class:0x000001017f0ad8>:
0x000001017eebe8>
If I substitute the key with :create it tries with
create_projects_path which doesn''t exist.
What am I doing wrong here? Or is it a bug in edge rails?
--
You received this message because you are subscribed to the...