Sha256: 53d72f36f15ae824a9cf15d1f2641be08f22550bd32c2478b6cf4ee77ae1b0dd

Contents?: true

Size: 466 Bytes

Versions: 3

Compression:

Stored size: 466 Bytes

Contents

module UploadifyRailsHelper

  def session_meta_tag 
    %(<meta name="session-param" content="#{Rack::Utils.escape_html(session_key_name)}"/>\n<meta name="session-token" content="#{Rack::Utils.escape_html(session_key)}"/>).html_safe
  end
  
  def session_field_tag
    hidden_field_tag session_key_name, session_key
  end

  def session_key_name
    Rails.application.config.session_options[:key]
  end
  
  def session_key
    cookies[session_key_name]
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
uploadify_rails3-0.1.2 lib/uploadify_rails_helper.rb
uploadify_rails3-0.1.1 lib/uploadify_rails_helper.rb
uploadify_rails3-0.1.0 lib/uploadify_rails_helper.rb