class Forma::Tab
This is a tab.
Attributes
actions[R]
icon[R]
title[R]
Public Class Methods
new(h = {})
click to toggle source
# File lib/forma/form.rb, line 212 def initialize(h = {}) h = h.symbolize_keys @title = h[:title] @icon = h[:icon] @col1 = h[:col1] @col2 = h[:col2] @actions = h[:actions] || [] end
Public Instance Methods
action(url, h={})
click to toggle source
# File lib/forma/form.rb, line 240 def action(url, h={}) h[:url] = url @actions << Action.new(h) end
add_field(f)
click to toggle source
Adding field to this tab.
# File lib/forma/form.rb, line 222 def add_field(f) col1.add_field(f) end
col1() { |col1| ... }
click to toggle source
Returns the first column of this tab.
# File lib/forma/form.rb, line 227 def col1 @col1 = Col.new if @col1.blank? yield @col1 if block_given? @col1 end
col2() { |col2| ... }
click to toggle source
Returns the second column of this tab.
# File lib/forma/form.rb, line 234 def col2 @col2 = Col.new if @col2.blank? yield @col2 if block_given? @col2 end