Maybe just define your own getter method in your model? Like:

class Foo < Sequel::Model
  def platforms
    @platform.split(',').map(&:to_i)
  end
end

Hope that does what you want.

On Apr 24, 2010 12:51 PM, "Serg Podtynnyi" <[email protected]> wrote:

In my table(model) I have varchar field called 'platforms' with value
'1,2,3'
Is there any way  to add alias model method that will return array of
integers instead of string or even overload this field?

--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected]<sequel-talk%[email protected]>
.
For more options, visit this group at
http://groups.google.com/group/sequel-talk?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
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