Hi Jeremy,

When I do this:

class User < Sequel::Model
 ...
end

user = User.new
user.properties = { name: 'Genc', age: 42 }  # or ':name =>..., '
user.save

#try to fetch assigned data
user.properties[:name] # => Genc
user.properties[:age] # => 42


However, If I fetch that data later or again like this:

# fetch user 1
user = User[1]

user.properties[:name] # => nil
user.properties[:age] # => nil
# Try string keys
user.properties['name'] # => Genc
user.properties['age'] # => 42


As you can see I did not use :symbol because the keys are strings not 
symbols. How can I make Sequel *globally *fetch all keys as symbolic?

Thanks,
Gencer

-- 
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