Method: MotionPrime::FormSection#render_field?

Defined in:
motion-prime/sections/form.rb

#render_field?(name, options) ⇒ Boolean

Returns:

  • (Boolean)


156
157
158
159
160
161
162
163
# File 'motion-prime/sections/form.rb', line 156

def render_field?(name, options)
  return true unless condition = options[:if]
  if condition.is_a?(Proc)
    self.instance_eval(&condition)
  else
    condition.to_proc.call(self)
  end
end