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

single quotes for controller generated routes #13705

Merged

Conversation

mess110
Copy link
Contributor

@mess110 mess110 commented Jan 13, 2014

Write routes in route.rb with single quotes

get 'welcome/index'

instead of

get "welcome/index"

@carlosantoniodasilva
Copy link
Member

You'll need to rebase from master, it says it can't be merged. Also can you please add a changelog entry, then squash your commits? Thanks.

@egilburg
Copy link
Contributor

Is there a convention to use of single vs double quotes that Rails tries to follow? I heard some say it's pretty much just easier to always use double quotes unless there is a specific need to not interpolate ruby or multibyte values, just to avoid all the hassle/diffs between the styles.

@mess110
Copy link
Contributor Author

mess110 commented Jan 14, 2014

@carlosantoniodasilva did rebase, squash and added the changelog entry.

Write routes in route.rb with single quotes

    get 'welcome/index'

instead of

    get "welcome/index"
@fxn
Copy link
Member

fxn commented Jan 14, 2014

@egilburg yes, in general in the project we prefer to use single quotes unless double quotes are needed. It is a stylistic preference, single quotes are more specific, they signal to the reader right away the string has nothing fancy.

As many stylistic conventions this is just a preference, I know people who always use double quotes. That's fine.

carlosantoniodasilva added a commit that referenced this pull request Jan 14, 2014
Single quotes for controller generated routes. This is more consistent with all other Rails generated code.
@carlosantoniodasilva carlosantoniodasilva merged commit 028029c into rails:master Jan 14, 2014
@mess110 mess110 deleted the controller_generator_route_quotes branch January 14, 2014 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants