Skip to content

Instantly share code, notes, and snippets.

@joemocha
Created November 10, 2010 03:44
Show Gist options
  • Save joemocha/670315 to your computer and use it in GitHub Desktop.
Save joemocha/670315 to your computer and use it in GitHub Desktop.
module FCG
module Client
module Comment
# sort attributes
ATTRIBUTES = [:site, :record, :body, :body_as_html, :deleted, :flagged_by, :depth, :path, :parent_id, :displayed_name, :user_id]
module ClassMethods
end
module InstanceMethods
protected
def setup
self.deleted = false
end
end
def self.included(receiver)
receiver.extend ClassMethods
receiver.send :include, FCG::Client::Persistence
receiver.send :include, InstanceMethods
receiver.validates_presence_of :site, :record, :body, :user_id
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment