Sha256: 5bd2744f8bb54e292aa16881146cf61a5511d61037481e3bad765e20af977b63

Contents?: true

Size: 441 Bytes

Versions: 16

Compression:

Stored size: 441 Bytes

Contents

require 'snaptable/engine'

module Snaptable
  @@use_permission = false
  @@add_button = true
  @@edit_button = true
  @@delete_button = true
  @@show_button = false

  mattr_accessor :use_permission, :add_button, :edit_button, :delete_button, :show_button

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

end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
snaptable-4.0.2 lib/snaptable.rb
snaptable-4.0.1 lib/snaptable.rb
snaptable-4.0.0 lib/snaptable.rb
snaptable-3.0.0 lib/snaptable.rb
snaptable-2.2.4 lib/snaptable.rb
snaptable-2.2.3 lib/snaptable.rb
snaptable-2.2.2 lib/snaptable.rb
snaptable-2.2.1 lib/snaptable.rb
snaptable-2.2.0 lib/snaptable.rb
snaptable-2.1.0 lib/snaptable.rb
snaptable-2.0.5 lib/snaptable.rb
snaptable-2.0.4 lib/snaptable.rb
snaptable-2.0.2 lib/snaptable.rb
snaptable-2.0.1 lib/snaptable.rb
snaptable-2.0 lib/snaptable.rb
snaptable-1.2.0 lib/snaptable.rb