Closed jpalumickas closed 8 years ago
@brendon can you take a look ?
Looks good and the tests are passing so that's good too :) My only advice would be to add a test that triggers the problem so that if someone decides to refactor that stuff in the future it won't break. Also, do we need to be so explicit on all of those queries, or is there a logical subset that are affected (e.g. methods that can be accessed via the join relationship). I'd assume some only acts on the individual model instance and wouldn't invoke the join?
Lastly, it's probably be an idea to DRY up the quoted stuff as another method. quoted_position_column_with_table_name
? or something like that :D
Yep, we need to add probably everywhere in case (like mine) someone will overwrite some gem methods. Agree with adding another method, but this I think is too long, because it's not reduce anything for the current situation.
Oh yes I agree, that was just to help explain what the method would be for :) It'd be great if there was an AR method that one could pass the column name and it returned a full quoted and table-namespaces column identifier.
Added a quoted_position_column_with_table_name
method 😉
Haha, thanks man. It's a terrible method name. :D One to refactor one day I guess :)
Updated, can you merge if it's ok and make a release ? 😉
Hi @jpalumickas, thanks for that. I've merged this and released 0.7.7 for you :)
Have a great day!
Thanks!
When I'm using custom
acts_as_list_list
withjoins
I have an error:column reference "id" is ambiguous
. We need to specify table name in some places to prevent this error.