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

Optimize routes indentation #30241

Merged
merged 1 commit into from Aug 14, 2017

Conversation

@yhirano55
Copy link
Contributor

@yhirano55 yhirano55 commented Aug 13, 2017

Summary

  1. Optimize routes indentation for actions of generator.

  2. Refactor ControllerGenerator when it given multiple actions:

    Command

    $ bin/rails g controller foo/bar/baz index show
    

    Before

    namespace :foo do
      namespace :bar do
        get 'baz/index'
      end
    end
    
    namespace :foo do
      namespace :bar do
        get 'baz/show'
      end
    end

    After

    namespace :foo do
      namespace :bar do
        get 'baz/index'
        get 'baz/show'
      end
    end
@rails-bot
Copy link

@rails-bot rails-bot commented Aug 13, 2017

r? @eileencodes

(@rails-bot has picked a reviewer for you, use r? to override)

@rafaelfranca rafaelfranca merged commit d1dabde into rails:master Aug 14, 2017
1 of 2 checks passed
rafaelfranca added a commit that referenced this issue Aug 14, 2017
@yhirano55 yhirano55 deleted the optimize_routes_indentation branch Aug 14, 2017
y-yagi added a commit that referenced this issue Feb 21, 2018
Since #30241, if namepsace is specified, routes will be generated even
if there is no actions.

However, it seems that this behavior is not intentionally added behavior.
As with 5.1, routes should not be generated if actions are not specified.

Fixes #32072.
y-yagi added a commit that referenced this issue Feb 22, 2018
Since #30241, if namepsace is specified, routes will be generated even
if there is no actions.

However, it seems that this behavior is not intentionally added behavior.
As with 5.1, routes should not be generated if actions are not specified.

Fixes #32072.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants