Want to populate a select box with just the items you HAVEN’T associated?

/ Published in: Rails
Save to your folder(s)

Copy this code and paste it in your HTML
  1. @post = Post.find(params[id])
  2. @categories = Category.find(:all) - @post.categories

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.