Joined May 2011
·
Posted to
Rails 4 & the PostgreSQL Array data type
over 1 year
ago
You can also define the default value with:
ruby
add_column :users, :emails, :string, array: true, default: []
no need to pass a String.
Posted to
Using delegate in Rails
over 1 year
ago
You can also allow_nil: true
which is really helpful so it doesn't raise exceptions if the delegated object returns nil
Achievements
158 Karma
9,852 Total ProTip Views
Cub
Have at least one original jQuery or Prototype open source repo
Nephila Komaci
Have at least one original repos where PHP is the dominant language
Walrus
The walrus is no stranger to variety. Use at least 4 different languages throughout all your repos
Altruist
Increase developer well-being by sharing at least 20 open source projects
Forked
Have a project valued enough to be forked by someone else
Charity
Fork and commit to someone's open source project in need
Mongoose 3
Have at least three original repos where Ruby is the dominant language
Mongoose
Have at least one original repo where Ruby is the dominant language
better do this if you have
has_one :organisation