lib/surveyor_gui/helpers/surveyor_helper_methods.rb
def html_div_html_safe(model, method, id, css_class)

        if (model.respond_to? method) && (model.send(method).present?)
          content_tag(:div, model.send(method).html_safe, id: "#{id}", class: "#{css_class}")
        else
          ''
        end

      end
# HTML for text that should be displayed as html_safe, surrounded by a div with the id and class
#
# if the model has this method defined (ex: if 'preamble' is defined for the Question model),
#   and there is some content for this thing (size > 0),
#     return a div with id and classes set for the content
# else return an empty string
HTML for text that should be displayed as html_safe, surrounded by a div with the id and class
if the model has this method defined (ex: if 'preamble' is defined for the Question model),
and there is some content for this thing (size > 0),
return a div with id and classes set for the content
else return an empty string
HTML for text that should be displayed as html_safe surrounded by a div with the id and class if the model has this method defined ( ex : if ' preamble ' is defined for the Question model ) and there is some content for this thing ( size > 0 ) return a div with id and classes set for the content else return an empty string
def html_div_html_safe(model, method, id, css_class)
        if (model.respond_to? method) && (model.send(method).present?)
          content_tag(:div, model.send(method).html_safe, id: "#{id}", class: "#{css_class}")
        else
          ''
        end
      end
def html_div_html_safe ( model , method , id , css_class ) if ( model . respond_to? method ) && ( model . send ( method ) . present? ) content_tag ( :div , model . send ( method ) . html_safe , id : "#{id}" , class : "#{css_class}" ) else '' end end
HTML for text that should be displayed as html_safe, surrounded by a div with the id and class
if the model has this method defined (ex: if 'preamble' is defined for the Question model),
and there is some content for this thing (size > 0),
return a div with id and classes set for the content
else return an empty string
HTML for text that should be displayed as html_safe surrounded by a div with the id and class if the model has this method defined ( ex : if ' preamble ' is defined for the Question model ) and there is some content for this thing ( size > 0 ) return a div with id and classes set for the content else return an empty string
model
method
id
css_class