@products.select("COUNT(*) AS count_all, spina_shop_products.properties->'manufacturer' AS filter").group("filter")
Ok, so I have some insight into this problem actually. I noticed you're aliasing query results in that SQL (
as coming_30_days etc). That means those attributes will be actually fetched using
method_missing rather than defined methods, which explains the relation to the change in 0.8.12.
For background on that (purely discussion of ActiveRecord), watch my RailsConf talk on the topic: https://www.youtube.com/watch?v=PNNrmNTQx2s&feature=emb_logo
coming_30_dayson your model will end up hitting
method_missing. For a model with Mobility enabled, and using fallthrough accessors (which are there if you're using dirty tracking), you will pass through that code that was changes. So that's the connection.
method_missingis not supposed to actually include keyword arguments:
method_missing(m, *a, &b)
method_missing, is actually breaking the API. Previously it was hiding that by not passing the keyword arguments to
super, but now since it is it can break other stuff. Ironically that was what the original PR was trying to fix.
**options, the options are being converted to a hash, which does not match the signature that ActiveRecord expects.
TranslatedStringand pass that name to
class TranslatedString < ActiveRecord::Base end class Post < ActiveRecord::Base extend Mobility translates :title, backend: :key_value, class_name: TranslatedString end
Hi folks, I've released 1.0.0.alpha :tada:
I'm also working on a wiki page explaining how to update your configuration to use the new version: https://github.com/shioyama/mobility/wiki/Introduction-to-Mobility-v1.0
This is still pre-release and I would really love to hear from anyone who tries to update. The vast majority of changes are around configuration, not around the actual backends, so your code should continue to work as-is as long as the configuraiton is updated correctly.
Alright folks, just released 1.0.0: https://rubygems.org/gems/mobility/versions/1.0.0
I'm working on setting up a website with docs and a blog, but I didn't want to wait anymore on that to avoid more people starting on 0.8. I assume something will go wrong somewhere, just create issues if you see anything unexpected.