On Thursday, June 22, 2017 at 11:59:15 PM UTC-7, Anonymous Testing wrote:
>
> You have right Jeremy! Thanks for answer, but at this point I have next 
> problem. "hash" attribute it's of course something other that the "#hash` 
> method on ruby object. The sequel add object#hash value instead of 
> attribute hash value. Can I do something or it's impossible and I need to 
> rename the column?
>

You can do something like:

  class Devise
    many_to_many :users, left_primary_key: :hash_value, 
left_primary_key_column: :hash, left_key: :device,
                         right_key: :user, :right_primary_key :token, 
join_table: :users_devices

    def hash_value
      values[:hash]
    end
  end

Thanks,
Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to