Skip to content

Action generator appends routes even if exists #146

@Lucas-Barret

Description

@Lucas-Barret

When you execute bundle exec hanami generate action books.index several times.
You end up with the same routes in routes.rb
Example :

$ bundle exec hanami generate action books.index
$ bundle exec hanami generate action books.index

## config/routes.rb

module Bookshelf
  class Routes < Hanami::Routes
    get "/books", to: "books.index"
    get "/books", to: "books.index"
  end
end

We should have the root only one time what do you think ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions