Sha256: adbb3d1938c68e66b39100f47cb251f41c11de420abcdae49511024801cffe43

Contents?: true

Size: 481 Bytes

Versions: 13

Compression:

Stored size: 481 Bytes

Contents

module ActiveScaffoldSortable
  module Core
    def self.included(base)
      base.alias_method_chain :initialize, :sortable
    end

    def initialize_with_sortable(model_id)
      initialize_without_sortable(model_id)
      # seems some rubies are returning strings in instance_methods and other symbols...
      self.actions << :sortable if !(model.instance_methods & ['acts_as_list_class', :acts_as_list_class, 'nested_set_scope', :nested_set_scope]).empty?
    end
  end
end

Version data entries

13 entries across 13 versions & 3 rubygems

Version Path
active_scaffold_duplicate-1.1.0 lib/active_scaffold_duplicate/core.rb~
active_scaffold_duplicate-1.0.3 lib/active_scaffold_duplicate/core.rb~
active_scaffold_sortable_vho-3.1.1 lib/active_scaffold_sortable/core.rb
active_scaffold_duplicate-1.0.2 lib/active_scaffold_duplicate/core.rb~
active_scaffold_duplicate-1.0.1 lib/active_scaffold_duplicate/core.rb~
active_scaffold_sortable_vho-3.1.0 lib/active_scaffold_sortable/core.rb
active_scaffold_duplicate-1.0.0 lib/active_scaffold_duplicate/core.rb~
active_scaffold_sortable-3.1.2 lib/active_scaffold_sortable/core.rb
active_scaffold_sortable-3.1.1 lib/active_scaffold_sortable/core.rb
active_scaffold_sortable-3.1.0 lib/active_scaffold_sortable/core.rb
active_scaffold_sortable-3.0.2 lib/active_scaffold_sortable/core.rb
active_scaffold_sortable_vho-3.0.1 lib/active_scaffold_sortable/core.rb
active_scaffold_sortable_vho-3.0.0 lib/active_scaffold_sortable/core.rb