2. Un poco sobre mí
• De Valencia • unvlog.com
• 4 años en The Cocktail y • iwannagothere.com //
La Coctelera mimaleta.com
• He sido freelance un • lacoctelera.com //
tiempo partigi.com
• Ahora trabajo en • actuable.es
Vizzuality
Tuesday, April 12, 2011
14. users[1]
users[:username => 'blat']
Tuesday, April 12, 2011
15. users.filter({:email =>
['ferblape@gmail.com','ferblape@vizzuality.co
m']}).sql
=> "SELECT * FROM `users` WHERE (`email` IN
('ferblape@gmail.com',
'ferblape@vizzuality.com'))"
Tuesday, April 12, 2011
32. class Table < Sequel::Model(:user_tables)
# Ignore mass-asigment on not allowed columns
self.strict_param_setting = false
# Allowed columns
set_allowed_columns(:name, :privacy, :tags)
def before_validation
self.privacy ||= :public
self.name = set_table_name if self.name.blank?
super
end
...
end
Tuesday, April 12, 2011