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

Projects
None yet
4 participants
@yhirano55
Copy link
Contributor

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

This comment has been minimized.

Copy link

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

continuous-integration/travis-ci/pr The Travis CI build failed
Details
codeclimate All good!
Details

rafaelfranca added a commit that referenced this pull request Aug 14, 2017

@yhirano55 yhirano55 deleted the yhirano55:optimize_routes_indentation branch Aug 14, 2017

y-yagi added a commit that referenced this pull request Feb 21, 2018

Do not add routes when actions are not specified
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 pull request Feb 22, 2018

Do not add routes when actions are not specified
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
You can’t perform that action at this time.