There is the following code line:
def tree_service_params
params.permit(:id, { tree_service_categories_attributes: [:id, :title, :enabled, :_destroy, { tree_service_category_items_attributes: [:id, :image, :title, :description, :cost, :enabled] }] })
end
This is simple Rails strong params. I need to break this line because it's too long. I use Rubocop to satisfy Ruby guidelines. How can I do it right? Thanks in advance!
This can depend upon the other rules you have turned on in Rubocop. But it seems straight forward, just make the lines shorter. Here's one easy way:
You could also go multi-line, like this: