Sha256: a1394f9214491b09fb5aa6247c9dc736bdd9225433f5a8e5cb03da990ba49911

Contents?: true

Size: 887 Bytes

Versions: 3

Compression:

Stored size: 887 Bytes

Contents

class ViewWithForms < Garterbelt::View
  def content
    div :class => 'servey' do
      partial FormView, :action => '/form/fu' do
        label do
          h4 "Are you fu?"
          input :type => 'radio', :name => 'fu', :value => 'yes'
          text 'Yes!'
          input :type => 'radio', :name => 'fu', :value => 'no'
          text 'no :('
        end
        
        input :type => 'submit', :value => "Answer the Fu Master"
      end
      
      partial FormView, :action => '/user/info', :method => 'put', :class => 'update' do
        h4 "Provide us with updated information"
        label do
          text "Name: "
          input :type => 'text', :name => 'name'
        end
        
        label do
          text "Email: "
          input :type => 'text', :name => 'email'
        end
        input :type => 'submit', :value => 'Update'
      end 
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
garterbelt-0.0.7 spec/integration/templates/view_with_forms.rb
garterbelt-0.0.6 spec/integration/templates/view_with_forms.rb
garterbelt-0.0.5 spec/integration/templates/view_with_forms.rb