Module | UserHelper
In: | app/helpers/user_helper.rb

### Methods

head_helper title_helper

### Constants

DEFAULT_HEAD_OPTIONS | = | { :notice => true, :message => true, :error => false

### Public Instance methods

head_helper(label, options = {})

head を返す。

[Source]

        # File app/helpers/user_helper.rb, line 15
    15:   def head_helper(label, options = {})
    16:     notice = message = error = nil
    17:     opts = DEFAULT_HEAD_OPTIONS.dup
    18:     opts.update(options.symbolize_keys)
    19:     s = "<h3>#{label}</h3>"
    20:     if flash['notice'] and not opts[:notice].nil? and opts[:notice]
    21:       notice = "<div><p>#{flash['notice']}</p></div>"
    22:       s = s + notice
    23:     end
    24:     if flash['message'] and not opts[:message].nil? and opts[:message]
    25:       message = "<div id=\"ErrorExplanation\"><p>#{flash['message']}</p></div>"
    26:       s = s + message
    27:     end
    28:     if not opts[:error].nil? and opts[:error]
    29:      error = error_messages_for('user')
    30:      if not error.nil?
    31:        error = error + "<br />"
    32:        s = s + error
    33:      end
    34:    end
    35:    return s
    36:   end

title_helper()

タイトルを返す。

[Source]

        # File app/helpers/user_helper.rb, line 10
    10:   def title_helper
    11:     "#{@controller.controller_class_name} #{@controller.action_name}"
    12:   end

[Validate]