Skip to content

Instantly share code, notes, and snippets.

@timurvafin
Created August 7, 2012 13:17
Show Gist options
  • Save timurvafin/3285259 to your computer and use it in GitHub Desktop.
Save timurvafin/3285259 to your computer and use it in GitHub Desktop.
merged_attributes = if included_attributes.last.is_a?(Hash)
included_attributes.pop
else
{ }
end
merged_attributes = {}
merged_attributes = included_attributes.pop if included_attributes.last.is_a?(Hash)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment