Displaying 1 result from an estimated 1 matches for "asignaturas_mallas_nivels".
2013 May 13
1
RAILS GET IDS
...ls.
I want to save the IDS of my 3 models to my table DETAILS between these,
my BD is Mysql.
ASIGNATURAS--MALLAS--NIVELS-------->ASIGNATURA_ID--_MALLAS_ID--_NIVELS_ID
In the view MALLA, i list my asignaturas, mallas and niveles, and in the
controller MALLA i want to save the arrays to my model
asignaturas_mallas_nivels.
class Malla < ActiveRecord::Base
attr_accessible :mall_estado , :clase_id, :nivel_ids, :asignatura_ids,
:nivel_id
belongs_to :clase
has_many :asignaturas_mallas_nivels
has_many :asignaturas, :through => :asignaturas_mallas_nivels
has_many :nivels, :through => :asignaturas_malla...