Module: ScribdFu::ClassMethods

Defined in:
lib/scribd_fu.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) has_ipaper_and_uses(str, opts = {:on => :save })

Load and inject ScribdFu goodies opts can be :on => :create, defaults to :on => :save



137
138
139
140
141
142
143
144
145
146
147
# File 'lib/scribd_fu.rb', line 137

def has_ipaper_and_uses(str, opts = {:on => :save })
  check_environment
  load_base_plugin(str)

  include InstanceMethods

  attr_accessor :ipaper_my_user_id

  send("after_#{opts[:on]}", :upload_to_scribd) # This *MUST* be an after_save
  before_destroy :destroy_ipaper_document
end