Sha256: 0dc35a1744124d9defece18555f66c2958339f1ee176c9f951da3eddc224fda9
Contents?: true
Size: 878 Bytes
Versions: 1
Compression:
Stored size: 878 Bytes
Contents
module HungryForm module Elements # Page is a main element of a form. # Each page can include a page structure, defined in the block # # A sample page could look like this: # page :about do # html :before, value: "Please fill out the following fields" # text_field :first_name # text_field :last_name # end # # The only required argument of a page is its name. # You can specify a title and a label in the attributes like this: # # page :about, title: "About me", label: "About" # # If there is no title or label specified, they will be created # from the :name argument class Page < Base::Group attr_accessor :title hashable :title def initialize(name, parent, resolver, attributes = {}, &block) super self.title ||= label end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
hungryform-0.0.4 | lib/hungryform/elements/page.rb |