rails 4 using strong parameters with no controller -


rails 4: i'm coming rails 3.2.x , have question. how can use strong parameter no controller.

i have model:

track (the 1 has controller  )   has_many :tracksegments, :dependent => :destroy   has_many :points, :through => :tracksegments tracksegment   belongs_to :track   has_many :points, :dependent => :destroy points   belongs_to :tracksegment 

track 1 has controller has strong parameters.

i want know can put parameters belongs "tracksegment" , "points" in rails 3.x it's direct in model in rails 4 have no controller them.

you permit parameters whichever controller sending them through. sounds sending them through track controller, if add them there.

see question how permit nested params rails 4 - strong parameters - nested objects


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -