Created
          June 24, 2012 23:42 
        
      - 
      
- 
        Save leucos/2985528 to your computer and use it in GitHub Desktop. 
    Ramaze blue_form helper quick example
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | require 'ramaze' | |
| class MyController < Ramaze::Controller | |
| map '/' | |
| helper :blue_form | |
| def index | |
| # BlueForm requires the passed object to respond_to? key names | |
| @result = OpenStruct.new(request.subset(:textname, :textanother)) | |
| form_for(@result, :method => :post) do |f| | |
| f.fieldset do | |
| f.g.div(:class => "control-group") do | |
| f.input_text 'Text label', :textname | |
| f.input_text 'Another Text label', :textanother | |
| f.input_submit 'Post !' | |
| end | |
| end | |
| end | |
| end | |
| end | |
| Ramaze.start | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment