Default values for table

I have a table called subscriptions with it’s respective model
Subscription.

Anytime I create a new entry for this table I would like to have a few
default values set automatically for the columns: timestamp_start and
is_subscribed. timestamp_start should default to Time.now.to_s and
is_subscribed should default to true.

How can I facilitate this in rails short of specifying these values
manually myself each time i create a new Subscription istance?

try this:

http://agilewebdevelopment.com/plugins/default_value

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs