title: Override one attribute in Rails strong params
body: <p>Is there a way I can override one attribute yet still use strong parameters in Rails? Such as in the following example, if I wanted to override the person's name every time, but also use the <code>person_params</code> method. There has to be a better way than manually setting <code>@person.name</code>, right?</p>
  
  <pre><code>class PeopleController &lt; ActionController::Base
  
    def create
      @person = Person.new(person_params)
      @person.name = "ABC"
      @person.save
    end
  
    private
  
      def person_params
        params.require(:person).permit(:name, :age)
      end
  end
  </code></pre>