Module: ModMonkey::Profile::ActMethods

Defined in:
lib/modmonkey_client/profile.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#editable_attrsObject

Returns the value of attribute editable_attrs.



12
13
14
# File 'lib/modmonkey_client/profile.rb', line 12

def editable_attrs
  @editable_attrs
end

#mm_attr_storeObject

Returns the value of attribute mm_attr_store.



11
12
13
# File 'lib/modmonkey_client/profile.rb', line 11

def mm_attr_store
  @mm_attr_store
end

Instance Method Details

#make_moderatable(options = {}, &block) ⇒ Object



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/modmonkey_client/profile.rb', line 14

def make_moderatable(options={}, &block)

  # Process passed in options
  # These 'dynamic methods' are stored either as a lambda, proc, symbol for method, or ordinary variable
  # mm_attr_keys = [:content_type, :profile_info, :item_url]
  # raise ArgumentError, "make_moderatable needs the following mandatory keys: #{(mm_attr_keys).join(', ')}" unless (options.keys | mm_attr_keys) == options.keys
  # self.editable_attrs = options[:editable_attrs] || []
  # self.mm_attr_store = options.select{|k,v| mm_attr_keys.include? k }
  # 
  unless included_modules.include?(Moderatable)
  #   before_create :set_default_approval_status
  #   after_create :create_mm_item
  #   after_update :update_mm_item
  #   after_destroy :destroy_mm_item
  #   attr_accessor :mm_update
  #   named_scope :approved, :conditions => {:mm_approved => true}
     include Moderatable
  #   def self.find(*args)
  #     with_scope :find=>{:conditions=>"#{self.to_s.tableize}.mm_approved=1"} do
  #       super
  #     end
  #   end
  end
end