RailsCasts Pro episodes are now free!

Learn more or hide this

Adam Zaninovich's Profile

GitHub User: adamzaninovich

Site: http://adamzaninovich.com

Comments by Adam Zaninovich

Avatar

I wish I had had this when I was first learning Rails. I felt pretty lost, and this is exactly the information I could have used.

I didn't know about Balsamiq, I'll definitely be trying that out on my next project.

Thanks for another awesome cast!

Avatar

Using the hidden tag set to nil didn't work in my rails project. It might have to do with the fact that I'm using the Mongoid ODM. I found that unless all the values in the array are valid ids, nothing will change. (I suspect that ActiveRecord just ignores any non-valid values.)

To combat this issue, I set my hidden tag to a string like 'included'. Then in the controller, I used the line

params[:product][:category_ids].delete 'included'

I'm not sure if this is the best solution, but it works.

Avatar

Sorttable is ridiculously easy to use, unobtrusive, and doesn't require all those http requests.

Thanks for the suggestion!