Skip to content

Instantly share code, notes, and snippets.

@waysidekoi
Created April 24, 2013 21:22
Show Gist options
  • Save waysidekoi/5455690 to your computer and use it in GitHub Desktop.
Save waysidekoi/5455690 to your computer and use it in GitHub Desktop.
mass assignment........ !
post = Post.new
post.user = current_user
post.attributes = params[:post]
post.save
<input name="post[user_id]" value="3">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment