Skip to content

Instantly share code, notes, and snippets.

@carolyncole
Created January 11, 2018 18:34
Show Gist options
  • Save carolyncole/2520aa38141500491e8c3bf9a0c39c74 to your computer and use it in GitHub Desktop.
Save carolyncole/2520aa38141500491e8c3bf9a0c39c74 to your computer and use it in GitHub Desktop.
Strange AutoSave Issue
collection = Collection.new({"title"=>["Test"], "subtitle"=>"", "creators"=>{"0"=>{"id"=>"", "given_name"=>"Lorraine C", "sur_name"=>"Santy", "display_name"=>"Lorraine C Santy", "email"=>"", "psu_id"=>""}}, "description"=>["Test Description"], "keyword"=>["test"], "contributor"=>[""], "rights"=>"", "publisher"=>[""], "date_created"=>[""], "subject"=>[""], "language"=>[""], "identifier"=>[""], "based_near"=>[""], "related_url"=>[""], "resource_type"=>[""], "visibility"=>"open", "permissions_attributes"=>{"0"=>{"type"=>"group", "name"=>"umg/course.1479EEE5-988A-3A80-6BF2-45421CAAB5C3", "access"=>"edit"}}})
collection.has_model  # ["Collection"]
collection.reload
collection.has_model  # []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment