optionsin the fallthrough accessor actually has some value (otherwise it would be empty and effectively would not be passed to the
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