rails 4 using strong parameters with no controller

ruby-on-rails, ruby-on-rails-4

Solution

You permit the parameters into whichever controller you are sending them through. It sounds like you are sending them through your track controller, if so you would add them there.

see this question about how to permit nested params Rails 4 - Strong Parameters - Nested Objects

Problem

Rails 4: I'm coming from rails 3.2.x And I have a question. How can I use Strong parameter with no controller. I have this model: ``` Track (the only one that has a 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 is the only one that has a Controller so it has some Strong Parameters. I want to know where can I put the parameters that belongs to "tracksegment" and "points" In Rails 3.x it's direct in the model but in rails 4 i have no controller for them.

Original source

Related problems