Skip to content
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.

Improve explanation of dynamic default values for fields #84

Closed
nickhoffman opened this issue Aug 4, 2011 · 0 comments
Closed

Improve explanation of dynamic default values for fields #84

nickhoffman opened this issue Aug 4, 2011 · 0 comments
Milestone

Comments

@nickhoffman
Copy link
Contributor

A lot of people on the mailing list are doing things like this:

field :something, :type => Date, :default => Date.today

when they should be putting Date.today in a Proc or lambda:

field :something, :type => Date, :default => Proc.new {Date.today}

The documentation for this can be improved to be more obvious.

@durran durran closed this as completed in e7d640e Aug 29, 2011
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants