Class: ActionController::Routing::RouteSet

Inherits:
Object
  • Object
show all
Defined in:
lib/active_scaffold/extensions/nil_id_in_url_params.rb

Instance Method Summary collapse

Instance Method Details

#generate_with_nil_id_awareness(*args) ⇒ Object



2
3
4
5
# File 'lib/active_scaffold/extensions/nil_id_in_url_params.rb', line 2

def generate_with_nil_id_awareness(*args)
  args[0].delete(:id) if args[0][:id].nil?
  generate_without_nil_id_awareness(*args)
end