Sha256: d30b7828dd584208ea09d7d318f831b6828c2b5ec8696cff52d33ff6e363c1bf

Contents?: true

Size: 342 Bytes

Versions: 12

Compression:

Stored size: 342 Bytes

Contents

module Reorder::TagExtensions
  def self.included(base)
    base.class_eval { alias_method_chain :children_find_options, :reorder }
  end
  
  def children_find_options_with_reorder(tag)
    options = children_find_options_without_reorder(tag)
    options[:order].sub!(/published_at/i, 'position') unless tag.attr['by']
    options
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
trusty-reorder-extension-2.0.6 lib/reorder/tag_extensions.rb
trusty-reorder-extension-2.0.5 lib/reorder/tag_extensions.rb
trusty-reorder-extension-2.0.4 lib/reorder/tag_extensions.rb
trusty-reorder-extension-2.0.3 lib/reorder/tag_extensions.rb
trusty-reorder-extension-2.0.2 lib/reorder/tag_extensions.rb
trusty-reorder-extension-2.0.1.pre.beta lib/reorder/tag_extensions.rb
trusty-reorder-extension-2.0.0.pre.beta lib/reorder/tag_extensions.rb
trusty-reorder-extension-1.1.0 lib/reorder/tag_extensions.rb
trusty-reorder-extension-1.0.3 lib/reorder/tag_extensions.rb
trusty-reorder-extension-1.0.2 lib/reorder/tag_extensions.rb
trusty-reorder-extension-1.0.1 lib/reorder/tag_extensions.rb
trusty-reorder-extension-1.0.0 lib/reorder/tag_extensions.rb