Sha256: 352a9ee7cef3bb0ae5a9deece730d10c561e09bda643ea76567520f332dadcd3

Contents?: true

Size: 1015 Bytes

Versions: 6

Compression:

Stored size: 1015 Bytes

Contents

module TableSortable
  module Controller

    extend ActiveSupport::Concern
    include TableSortable::Core

    included do
      helper_method :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

6 entries across 6 versions & 1 rubygems

Version Path
table_sortable-1.0.0.pre.alpha.9 lib/table_sortable/controller.rb
table_sortable-1.0.0.pre.alpha.8 lib/table_sortable/controller.rb
table_sortable-1.0.0.pre.alpha.7 lib/table_sortable/controller.rb
table_sortable-1.0.0.pre.alpha.6 lib/table_sortable/controller.rb
table_sortable-1.0.0.pre.alpha.5 lib/table_sortable/controller.rb
table_sortable-1.0.0.pre.alpha.4 lib/table_sortable/controller.rb