Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow "make" to take a block #107

Open
wulftone opened this issue Jan 26, 2012 · 0 comments
Open

Allow "make" to take a block #107

wulftone opened this issue Jan 26, 2012 · 0 comments

Comments

@wulftone
Copy link

I'm finding that making a new blueprint for a simple little thing isn't always the nicest way to go about doing things, so some flexibility in how make is used would be nice. MyModel.create allows you to supply a block to futz with attributes, and this functionality seems like a perfect fit for make.

User.make :admin, do |u|
  u.password = 'xxxxxx' unless Rails.env.production?
end

etc..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant