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

LiteralInCondition valid? #317

Closed
lenntt opened this issue Jul 1, 2013 · 1 comment
Closed

LiteralInCondition valid? #317

lenntt opened this issue Jul 1, 2013 · 1 comment

Comments

@lenntt
Copy link

lenntt commented Jul 1, 2013

Hi,

I noticed that the following code gives me the warning:

W: Literal 'index' appeared in a condition.

(params[:action] || 'index').to_sym

Im not sure what rubocop is suggesting here and how it matches with the ruby-style-guide. ??

@bbatsov
Copy link
Collaborator

bbatsov commented Jul 1, 2013

This is a bug. I'll have it fixed.

@bbatsov bbatsov closed this as completed in c0024f6 Jul 2, 2013
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

No branches or pull requests

2 participants