Sha256: 7d96c00d81719f5fffc368398cb3316c35ca01e6dee4a6ed584d5405f10a809f

Contents?: true

Size: 627 Bytes

Versions: 19

Compression:

Stored size: 627 Bytes

Contents

module Rearview
  module ApplicationHelper
    def rearview_static_path(segment)
      prefix = if Rails.env.development?
               "/rearview-src"
               else
               "/rearview"
               end
      ( segment.present? ? prefix + segment : prefix )
    end
    def rearview_link_tag(href,options)
      options = options.symbolize_keys
      options[:href] = rearview_static_path(href)
      tag("link",options)
    end
    def rearview_img_tag(source,options)
      options = options.symbolize_keys
      options[:src] = rearview_static_path("/img"+source)
      tag("img", options)
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
rearview-1.1.2-jruby app/helpers/rearview/application_helper.rb
rearview-1.1.1-jruby app/helpers/rearview/application_helper.rb
rearview-1.1.0-jruby app/helpers/rearview/application_helper.rb
rearview-1.0.3.rc.4-jruby app/helpers/rearview/application_helper.rb
rearview-1.0.3.rc.3-jruby app/helpers/rearview/application_helper.rb
rearview-1.0.3.rc.2-jruby app/helpers/rearview/application_helper.rb
rearview-1.0.3.rc.1-jruby app/helpers/rearview/application_helper.rb
rearview-1.0.2-jruby app/helpers/rearview/application_helper.rb
rearview-1.0.2.rc.4-jruby app/helpers/rearview/application_helper.rb
rearview-1.0.2.rc.3-jruby app/helpers/rearview/application_helper.rb
rearview-1.0.2.rc.2-jruby app/helpers/rearview/application_helper.rb
rearview-1.0.2.rc.1-jruby app/helpers/rearview/application_helper.rb
rearview-1.0.1-jruby app/helpers/rearview/application_helper.rb
rearview-1.0.0-jruby app/helpers/rearview/application_helper.rb
rearview-1.0.0.rc5-jruby app/helpers/rearview/application_helper.rb
rearview-1.0.0.rc4-jruby app/helpers/rearview/application_helper.rb
rearview-1.0.0.rc3-jruby app/helpers/rearview/application_helper.rb
rearview-1.0.0.rc2-jruby app/helpers/rearview/application_helper.rb
rearview-1.0.0.rc1-jruby app/helpers/rearview/application_helper.rb