Lucky Logo

#Path and route helpers

Lucky automatically generates some helpers for generating links.

You can access them as class methods on the action itself. They are:

class Projects::Users::Index < BrowserAction
  # Normally you would use `nested_route`
  # We'll use `get` here to make the example more clear
  get "projects/:project_id/users" do
    plain_text "Users"

You can then call these methods

We’ll talk about this more in the Pages guide. You can use the route helper with links and forms to automatically set the path and HTTP method at the same time.