Optimized variable creation for views and data saving using loops on params and 'object.attribute' hashes