Add value to params before save

I'm not entirely clear what you are trying to achieve but why not set the attribute directly then save? You don't need to add it to the params hash, but just to the object itself (if I understand your question correctly).

@my_object.attribute = value if # do something here else # do something else end

You might want to also check out the 'update' and 'update_attributes' methods as well.

...and the 'update_attribute' method as well.

update_attribute and update_attributes allow you to set the attribute(s) and save the record in one step. So you might be using the params hash to populate the bulk of the object's attributes and then adding in extra attribute(s) with these methods.