Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Action generator that accepts http method and path` #1098

Open
paulcsmith opened this issue Apr 11, 2020 · 0 comments
Open

Action generator that accepts http method and path` #1098

paulcsmith opened this issue Apr 11, 2020 · 0 comments
Labels
feature request A new requested feature / option hacktoberfest Valid Issue for Hacktoberfest

Comments

@paulcsmith
Copy link
Member

paulcsmith commented Apr 11, 2020

The current generator only allows for RESTful actions. Providing something else will throw an error:

❯ lucky gen.action.browser Members::Dashboard
  Could not infer route for Members::Dashboard

  Got:
    Members::Dashboard (missing a known resourceful action)

  Expected something like:
    Users::Index # Index, Show, New, Create, Edit, Update, or Delete

We should add an option to specify the HTTP method and path. If you provide a RESTful action, then it will still infer.

lucky gen.action.browser Messages::Archive get /message/:message_id/archive

would generate Messages::Archive class with get "/messages/:message_id/archive". When no path and HTTP method are provided, it would still show the error when it can't infer.

@paulcsmith paulcsmith added this to the Remove route inference milestone Apr 11, 2020
@jwoertink jwoertink added hacktoberfest Valid Issue for Hacktoberfest feature request A new requested feature / option and removed difficult post 1.0 labels Oct 2, 2021
@jwoertink jwoertink added expected for 1.0 and removed hacktoberfest Valid Issue for Hacktoberfest labels Nov 1, 2021
@jwoertink jwoertink added the hacktoberfest Valid Issue for Hacktoberfest label Oct 1, 2022
@jwoertink jwoertink removed the hacktoberfest Valid Issue for Hacktoberfest label Nov 6, 2022
@jwoertink jwoertink added the hacktoberfest Valid Issue for Hacktoberfest label Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request A new requested feature / option hacktoberfest Valid Issue for Hacktoberfest
Projects
None yet
Development

No branches or pull requests

3 participants