password_field

password_field(object_name, method, options = {}) Instance Public methods Returns an input tag of the âpasswordâ type tailored for accessing a specified attribute (identified by method) on an object assigned to the template (identified by object). Additional options on the input tag can be passed as a hash with options. These options will be tagged onto the HTML as an HTML element attribute as in the example shown. For security reasons this field is blank by default; pass in a valu

set_label_constrain

set_label_constrain(val, str, *args) Instance Public methods

ret_val

ret_val(val) Class Public methods def self._get_extra_args_tbl # return an array of convert procs [] end

take

ary.take(n) â new_ary Instance Public methods Returns first n elements from the array. If a negative number is given, raises an ArgumentError. See also #drop a = [1, 2, 3, 4, 5, 0] a.take(3) #=> [1, 2, 3]

lower

lower(belowthis=None) Instance Public methods

radio_button_tag

radio_button_tag(name, value, checked = false, options = {}) Instance Public methods Creates a radio button; use groups of radio buttons named the same to allow users to select from a group of options. Options :disabled - If set to true, the user will not be able to use this input. Any other key creates standard HTML options for the tag. Examples radio_button_tag 'gender', 'male' # => <input id="gender_male" name="gender" type="radio" value="male" /> radio_button_ta

_layout_for

_layout_for(*args, &block) Instance Public methods Overwrites #_layout_for in the context object so it supports the case a block is passed to a partial. Returns the contents that are yielded to a layout, given a name or a block. You can think of a layout as a method that is called with a block. If the user calls yield :some_name, the block, by default, returns content_for(:some_name). If the user calls simply yield, the default block returns content_for(:layout). The user can o

pp

pp(*objs) Instance Public methods Prints the given objs calling Object#inspect on each. See puts for more detail.

labelwidget

labelwidget() Instance Public methods

sort_by

enum.sort_by { |obj| block } â arrayenum.sort_by â an_enumerator Instance Public methods Sorts enum using a set of keys generated by mapping the values in enum through the given block. If no block is given, an enumerator is returned instead. %w{apple pear fig}.sort_by { |word| word.length} #=> ["fig", "pear", "apple"] The current implementation of sort_by generates an array of tuples containing the original collection element and the mapped va