Sha256: 575ba4a73b26a47caf4aecfd412e203c3953567ce134b519c2c4de2657a42633

Contents?: true

Size: 885 Bytes

Versions: 4

Compression:

Stored size: 885 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

4 entries across 4 versions & 1 rubygems

Version Path
garterbelt-0.1.1 spec/integration/templates/view_with_forms.rb
garterbelt-0.1.0 spec/integration/templates/view_with_forms.rb
garterbelt-0.0.9 spec/integration/templates/view_with_forms.rb
garterbelt-0.0.8 spec/integration/templates/view_with_forms.rb