Skip to content

Instantly share code, notes, and snippets.

@radar
Created January 21, 2010 22:32
Show Gist options
  • Save radar/283267 to your computer and use it in GitHub Desktop.
Save radar/283267 to your computer and use it in GitHub Desktop.
for name in params[:post][:categories].split(",")
post.categories.find_or_create_by_name(name)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment