0

Is there a better way to do this in Rails using the wicked gem?

def finish_wizard_path
  public_send("#{controller_name}_path", current_user.try(controller_name.intern).id)
end
user2012677
  • 5,465
  • 6
  • 51
  • 113

1 Answers1

2

This can be done by using url_for method

url_for(controller: controller_name, action: :new, id: current_user.id)
Sikandar Tariq
  • 1,296
  • 1
  • 13
  • 29