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

Fix Style/MultilineTernaryOperator offenses #754

Closed

Conversation

magni-
Copy link
Contributor

@magni- magni- commented Apr 4, 2016

Yet another small PR from #752

@jaredbeck
Copy link
Member

These are all fine. I'd prefer to extract private methods, but that can happen later.

Please rebase.

@magni- magni- force-pushed the rubocop_multiline_ternary branch from 3660aad to 271ff8b Compare April 5, 2016 03:54
@magni- magni- force-pushed the rubocop_multiline_ternary branch from 271ff8b to 95b9d53 Compare April 5, 2016 03:55
@@ -284,9 +282,8 @@ def reify_has_many_through(transaction_id, associations, model, options = {})
# table, this method would return the constant `Fruit`.
def version_reification_class(version, attrs)
inheritance_column_name = version.item_type.constantize.inheritance_column
class_name = attrs[inheritance_column_name].blank? ?
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do people ever set inheritance_column to "" ? That's the only case in which this would break...

Happy to revert this change if needed. Looking through git, it's been blank? since the code was first written in 2009 (so not in response to a bug report from someone using inheritance_column = "").

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do people ever set inheritance_column to "" ?

Seems unlikely, but we should not be changing behavior in a linter commit. If we are going to make that change, please make a separate PR. Thanks.

@jaredbeck jaredbeck mentioned this pull request Apr 6, 2016
@jaredbeck
Copy link
Member

Closed by #768

@jaredbeck jaredbeck closed this Apr 6, 2016
@magni- magni- deleted the rubocop_multiline_ternary branch April 7, 2016 06:07
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

2 participants