-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Check for #390 to prevent application breakage. #451
Check for #390 to prevent application breakage. #451
Conversation
@@ -29,7 +29,7 @@ def self.columns | |||
@acts_as_taggable_on_counter_columns ||= begin | |||
db_columns = super | |||
if _has_tags_counter_column?(db_columns) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But, now I'm wondering why I wrote this _has_tags_counter_column
method as the column is on Tag, not Tagging. And I guess the tests were passing for the wrong reason-- that the column existed, not that the counter_cache was turned on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though I suppose the columns call is still the best place for this check, as we can use it as a signal that we have db connectivity, rather than the value of it, itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was half asleep when i did this PR, let me fix that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto :)
Looks good. I'd like to add a test for the counter_cache being added. The one that was added as part of this feature doesn't actually test it. It only tests for the presence of the column. Your thoughts? |
I'd like to merge this.. can you help me finish it? |
Sorry, i forgot. I will do that right now. |
Could you rebase to remove the extra commit? |
[Fix] counter_cache, Check for #390 to prevent application breakage.
No description provided.