Sha256: 3ac1204ff93f255e3eb1bb8999cf83f61a9682c4bc4a1917df561f294b65ecdc

Contents?: true

Size: 1 KB

Versions: 12

Compression:

Stored size: 1 KB

Contents

module TableSortable
  module Controller

    extend ActiveSupport::Concern
    include TableSortable::Core

    included do
      helper_method :columns, :all_columns
      prepend_before_action :initialize_table_sortable
    end

    module ClassMethods
      def define_columns(*args)
        options = args.extract_options!
        before_action do
          define_columns(options)
        end

      end

      def define_column(*args)
        before_action do
          define_column *args
        end
      end

      def define_column_order(order)
        before_action do
          define_column_order order
        end
      end

      def define_column_offset(offset)
        before_action do
          define_column_offset offset
        end
      end

      def define_translation_key(key)
        before_action do
          define_translation_key key
        end
      end

      def define_template_path(path)
        before_action do
          define_template_path path
        end
      end
    end


  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
table_sortable-1.0.0.pre.alpha.21 lib/table_sortable/controller.rb
table_sortable-1.0.0.pre.alpha.20 lib/table_sortable/controller.rb
table_sortable-1.0.0.pre.alpha.19 lib/table_sortable/controller.rb
table_sortable-1.0.0.pre.alpha.18 lib/table_sortable/controller.rb
table_sortable-1.0.0.pre.alpha.17 lib/table_sortable/controller.rb
table_sortable-1.0.0.pre.alpha.16 lib/table_sortable/controller.rb
table_sortable-1.0.0.pre.alpha.15 lib/table_sortable/controller.rb
table_sortable-1.0.0.pre.alpha.14 lib/table_sortable/controller.rb
table_sortable-1.0.0.pre.alpha.13 lib/table_sortable/controller.rb
table_sortable-1.0.0.pre.alpha.12 lib/table_sortable/controller.rb
table_sortable-1.0.0.pre.alpha.11 lib/table_sortable/controller.rb
table_sortable-1.0.0.pre.alpha.10 lib/table_sortable/controller.rb