@hoge = Hoge.new(params[:hoge]) do |h|
h.user = current_user
end
Hoge.create(params[:hoge]) do |h|
h.user = current_user
end
User.create([{ name: 'hoge'}, { name: 'huga' }, { name: 'piyo' }]) do |u|
u.password = 'test'
end
Last active
December 13, 2015 21:29
-
-
Save hrysd/4977845 to your computer and use it in GitHub Desktop.
これ知らなかった。
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment