Skip to content

Instantly share code, notes, and snippets.

@plu
Created September 19, 2015 12:03
Show Gist options
  • Select an option

  • Save plu/ce07ece45951e1797104 to your computer and use it in GitHub Desktop.

Select an option

Save plu/ce07ece45951e1797104 to your computer and use it in GitHub Desktop.
organization_testers GET /organizations/:organization_id/testers(/page/:page)(.:format) members#index {:role=>:tester}
GET /organizations/:organization_id/testers(.:format) members#index {:role=>:tester}
organization_admins GET /organizations/:organization_id/admins(/page/:page)(.:format) members#index {:role=>:admin}
GET /organizations/:organization_id/admins(.:format) members#index {:role=>:admin}
Loading development environment (Rails 4.2.4)
2.1.5 :001 > include Rails.application.routes.url_helpers
=> Object
2.1.5 :002 > default_url_options[:host] = "localhost"
=> "localhost"
2.1.5 :003 > url_for({"role"=>"tester", "controller"=>"members", "action"=>"index", "organization_id"=>2})
=> "http://localhost/organizations/2pPWLrlm/admins"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment