Sha256: ca2766ad497efcd54e0d92c53aa3246a3d796e58cea10b625ad534c952a8d9da

Contents?: true

Size: 337 Bytes

Versions: 3

Compression:

Stored size: 337 Bytes

Contents

module Liquid
  module Rails
    module DateFilter
      delegate \
                :distance_of_time_in_words,
                :time_ago_in_words,

                to: :__h__

      private

        def __h__
          @context.registers[:view]
        end
    end
  end
end

Liquid::Template.register_filter(Liquid::Rails::DateFilter)

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
liquid-rails-0.2.0 lib/liquid-rails/filters/date_filter.rb
liquid-rails-0.2.0.beta1 lib/liquid-rails/filters/date_filter.rb
liquid-rails-0.1.4 lib/liquid-rails/filters/date_filter.rb