Module: RTrail::Helpers::ClassMethods

Defined in:
lib/rtrail/helpers.rb

Instance Method Summary collapse

Instance Method Details

#has_post(*actions) ⇒ Object



13
14
15
16
17
18
19
20
21
# File 'lib/rtrail/helpers.rb', line 13

def has_post(*actions)
  actions.each do |action|
    define_method(action) do |data|
      kind = self.class.basename
      puts "in POST #{action}_#{kind}/#{self.id}, data = #{data.inspect}"
      #return client.post("#{action}_#{kind}")
    end
  end
end