#RubyOnRails - 13 April 2019
« Back 1 day Forward 1 day »
[21:44:44] jarr0dsz: hello everyone, i have a list of object attributes i need in several places, can i store them "generic" so i can use them in multiple placeS? ( dry )
[21:45:05] jarr0dsz: for example i have in my strong params this ```params.require(:request_wizard).permit(:request_target)```
[21:45:21] jarr0dsz: and i do at another place @request_wizard.request.attributes.slice('request_uuid')
[21:45:33] jarr0dsz: i look for a way to define the attributes generic so i can use them on several occasions, is that possible?
[21:47:15] jarr0dsz: doing like so: @request_wizard.request.attributes = request_wizard_params seems logic, i think that will also do it? it would only add the variables that have been filled-in though