Skip to content

Instantly share code, notes, and snippets.

@universal
Forked from selvait90/sample.rb
Last active August 29, 2015 14:16
Show Gist options
  • Select an option

  • Save universal/08b87844585e44ec7180 to your computer and use it in GitHub Desktop.

Select an option

Save universal/08b87844585e44ec7180 to your computer and use it in GitHub Desktop.
params = {:id=>"5", :jurisdiction=>{:place_attributes=>{:name=>"Allen County15", :short_name=>"Allen County15", :id=>"5"}}}
@jurisdiction = PlaceEntity.jurisdictions.excluding_unassigned.find(params[:id])
@jurisdiction.place
@jurisdiction.update_attributes(params[:jurisdiction])
@jurisdiction.place.valid?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment