On Friday, May 3, 2013 2:47:46 AM UTC-7, Petr Kaleta wrote:
>
> Is there any way, how to detect, that model's column is selected? For 
> example I have a User model, which has columns `id`, `name`, `age`. So when 
> I make a query `Model.select(:id, :name)` how can I detect 
> in after_initialize that column `age` is not selected?


  model.values.has_key?(:age)

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 http://groups.google.com/group/sequel-talk?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to