Class: Redmine::FieldFormat::StringFormat

Inherits:
Unbounded show all
Defined in:
lib/redmine/field_format.rb

Overview

Since:

  • 2.5.0

Direct Known Subclasses

LinkFormat

Instance Method Summary collapse

Methods inherited from Unbounded

#validate_single_value

Methods inherited from Base

#before_custom_field_save, #bulk_edit_tag, #cast_custom_value, #cast_single_value, #cast_value, #edit_tag, field_attributes, #formatted_custom_value, #group_statement, #join_for_order_statement, #label, #name, #order_statement, #possible_custom_value_options, #possible_values_options, #query_filter_options, #target_class, #validate_custom_field, #validate_custom_value, #validate_single_value, #value_from_keyword

Methods included from Helpers::URL

#uri_with_safe_scheme?

Methods included from I18n

#current_language, #day_letter, #day_name, #find_language, #format_date, #format_time, #l, #l_hours, #l_hours_short, #l_or_humanize, #languages_options, #ll, #lu, #month_name, #set_language_if_valid, #valid_languages

Instance Method Details

#formatted_value(view, custom_field, value, customized = nil, html = false) ⇒ Object



315
316
317
318
319
320
321
322
323
324
325
326
327
# File 'lib/redmine/field_format.rb', line 315

def formatted_value(view, custom_field, value, customized=nil, html=false)
  if html
    if custom_field.url_pattern.present?
      super
    elsif custom_field.text_formatting == 'full'
      view.textilizable(value, :object => customized)
    else
      value.to_s
    end
  else
    value.to_s
  end
end