On Sunday, September 2, 2012 3:28:06 PM UTC-7, deepfryed wrote:
>
> I came across an issue in our codebase today that had a work around. I 
> found the issue to be a field with a name 'display' that is defined in 
> Kernel. 
>

This is by design so that you don't end up with broken models if your 
database columns clash with ruby method names (e.g. a column named "send").
 

> Is there a suggested way to define attributes with names overlapping 
> Object methods ? 
>

  def display
    self[:display]
  end

I haven't tested this, but it might also work:

  def_column_alias(:display, :display)

Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sequel-talk/-/sDfw4wBedicJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en.

Reply via email to