Skip to content

Instantly share code, notes, and snippets.

@noeticpenguin
Created July 26, 2013 21:26
Show Gist options
  • Save noeticpenguin/6092366 to your computer and use it in GitHub Desktop.
Save noeticpenguin/6092366 to your computer and use it in GitHub Desktop.
obj.rb
class Obj < ActiveRecord::Base
belongs_to :org
has_many :fields
has_many :record_type_infos
accepts_nested_attributes_for :fields, :record_type_infos
attr_accessible :name, :label, :keyPrefix, :custom, :labelPlural, :layoutable, :activateable, :searchable,
:deprecatedAndHidden, :createable, :updateable, :deletable, :customSetting, :feedEnabled,
:mergeable, :queryable, :replicateable, :retrieveable, :undeletable, :triggerable, :org_id, :urls
def urls=(data)
write_attribute :urls, data.to_json
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment