Sha256: be26fda70428dbcd63fe617f7db30c3ac22a0514575fb786d6f914148b97ef9e

Contents?: true

Size: 553 Bytes

Versions: 6

Compression:

Stored size: 553 Bytes

Contents

module AskHelper

  def question_label(question, builder=nil)
    if question.type.to_sym == :ChecklistQuestion
      h(question.name)
    else
      if builder
        builder.label(:answer, question.name)
      else
        label_tag(:answer, question.name)
      end
    end
  end

  def question_instructions(question)
    require 'rails_autolink/helpers'
    
    unless question.instructions.blank?
      content_tag(:span, auto_link(simple_format(question.instructions), :all, :target=>'_blank'), :class=>'instructions')
    end || ''
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ask-0.3.1 app/helpers/ask_helper.rb
ask-0.3.0 app/helpers/ask_helper.rb
ask-0.2.0 app/helpers/ask_helper.rb
ask-0.1.2 app/helpers/ask_helper.rb
ask-0.1.1 app/helpers/ask_helper.rb
ask-0.1.0 app/helpers/ask_helper.rb