-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
That would be good if SimpleNavigation::Item would accept lambdas as url attr. That way I can use routes for resources. I extended SimpleNavigation::Item as:
class SimpleNavigation::Item
def url; @url.is_a?(Proc) ? @url.call : @url; end
end
Now In SimpleNavigation::Configuration.run block I can do next:
primary.item :edit, 'edit', lambda { edit_apartment_path @apartment }, :unless => lambda { @apartment.nil? }
Metadata
Metadata
Assignees
Labels
No labels