Module: Snaptable

Defined in:
lib/snaptable.rb,
lib/snaptable/engine.rb,
lib/snaptable/version.rb,
lib/snaptable/constructor/renderer.rb,
lib/snaptable/constructor/sortable.rb,
lib/snaptable/helpers/table_helper.rb,
lib/snaptable/constructor/base_table.rb,
lib/snaptable/constructor/collection.rb,
lib/snaptable/helpers/buttons_helper.rb

Defined Under Namespace

Modules: Constructor, Helpers Classes: Engine

Constant Summary collapse

VERSION =
"2.2.4"
@@use_permission =
false
@@add_button =
true
@@edit_button =
true
@@delete_button =
true
@@show_button =
false

Class Method Summary collapse

Class Method Details

.respond_with(controller, *args) ⇒ Object



12
13
14
15
16
17
# File 'lib/snaptable.rb', line 12

def self.respond_with(controller, *args)
  if name = controller.params[:table]
    table = args.find { |table| table.table_name == name }
    table.respond
  end
end