Skip to content

Instantly share code, notes, and snippets.

@corbanbrook
Created October 31, 2013 15:56
Show Gist options
  • Select an option

  • Save corbanbrook/7252147 to your computer and use it in GitHub Desktop.

Select an option

Save corbanbrook/7252147 to your computer and use it in GitHub Desktop.
def update_all
updated_styles = []
params[:styles].each do |style_params|
style = styles.find(style_params[:id])
update_resource_attributes!(style, style_params)
style.save!
updated_styles << style
end
respond_with(updated_styles)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment