Module: NCore::Base::ClassMethods

Defined in:
lib/ncore/base.rb

Instance Method Summary collapse

Instance Method Details

#crud(*types) ⇒ Object



21
22
23
24
25
26
27
28
29
30
31
# File 'lib/ncore/base.rb', line 21

def crud(*types)
  include All    if types.include? :all
  include Build  if types.include? :build
  include Count  if types.include? :count
  include Create if types.include? :create
  include Delete if types.include? :delete
  include DeleteBulk if types.include? :delete_bulk
  include Find   if types.include? :find
  include Update if types.include? :update
  include UpdateBulk if types.include? :update_bulk
end

#resource_pathObject



33
34
35
# File 'lib/ncore/base.rb', line 33

def resource_path
  class_name.underscore.pluralize
end