Skip to content

Instantly share code, notes, and snippets.

@leucos
Created June 24, 2012 23:42
Show Gist options
  • Save leucos/2985528 to your computer and use it in GitHub Desktop.
Save leucos/2985528 to your computer and use it in GitHub Desktop.
Ramaze blue_form helper quick example
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