Closed zzeon closed 9 years ago
class StripePaymentPlan < PaymentPlan hstore_accessor :metadata, stripe_id: { data_type: :string, store_key: 'sid' } validates_uniqueness_of :stripe_id end
Trying to call save, I get something like:
save
NoMethodError: undefined method `limit' for nil:NilClass activerecord-4.1.8/lib/active_record/validations/uniqueness.rb:65:in `build_relation'
It seems ActiveRecord actually attempts to look up the column rather than checking the hstore column, any good ways to handle this?
This is more of a issue with the uniqueness validator in Rails than hstore_accessor, so I am closing this.
uniqueness
hstore_accessor
Trying to call
save
, I get something like:It seems ActiveRecord actually attempts to look up the column rather than checking the hstore column, any good ways to handle this?