[Rails] Re: Iterate over a set of classes

2014-04-11 Thread Ignacio Toscano
Ups i forget the visible condition B.where(a_id: @As, is_visible: true) if you have a massive amounts of Bs the Data Base server will hate you,so a better solution is @Bs=Array.new @As.each do |a| @BsB.where(a_id: a, is_visible: true) end -- Posted via http://www.ruby-forum.com/. -- You

[Rails] newbie, reciving a hash from the view

2010-07-19 Thread Ignacio Toscano
hi, i am new in ruby, i have to do the next Send a hash (key are strings and values are booleans) to the view, show it like check box in the view, using string like nome and the value like check or not checked, and recover this hash modified to the controller for work with it so i wrote this in