Sha256: 2322f948591ee3d3729850d22aef62e91ca222a2c344064385b037ce35dc3ae9

Contents?: true

Size: 320 Bytes

Versions: 1

Compression:

Stored size: 320 Bytes

Contents

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

        to: :view

      private

        def view
          @view ||= @context.registers[:view]
        end
    end
  end
end

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
liquid4-rails-0.2.0 lib/liquid4-rails/filters/date_filter.rb