Created
April 15, 2011 12:49
-
-
Save zenlor/921641 to your computer and use it in GitHub Desktop.
Padrino form_for bug ?
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 'sinatra/base' | |
| require 'padrino-helpers' | |
| class SimpleObject | |
| attr_accessor :foo, :bar, :moo, :goo | |
| end | |
| class App < Sinatra::Base | |
| register Padrino::Helpers | |
| configure do | |
| enable :inline_templates | |
| end | |
| get '/' do | |
| @foobar = SimpleObject.new | |
| erb :index | |
| end | |
| get '/notbugged' do | |
| @foobar = SimpleObject.new | |
| erb :not_bugged | |
| end | |
| end | |
| App.run! | |
| __END__ | |
| @@ layout | |
| <html> | |
| <body> | |
| <%= link_to 'bugged', '/' %> | |
| <%= link_to 'not bugged', '/notbugged' %> | |
| <hr> | |
| <%= yield %> | |
| </body> | |
| </html> | |
| @@ index | |
| <% form_for @foobar, '/', :method => :put do |f| %> | |
| testytest | |
| <% end %> | |
| @@ not_bugged | |
| | |
| <% form_for @foobar, '/', :method => :put do |f| %> | |
| testytest | |
| <% end %> |
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
| lor@lyla ~ % gem env | |
| RubyGems Environment: | |
| - RUBYGEMS VERSION: 1.6.2 | |
| - RUBY VERSION: 1.9.2 (2011-02-18 patchlevel 180) [x86_64-darwin10.7.0] | |
| - INSTALLATION DIRECTORY: /Users/lor/.rvm/gems/ruby-1.9.2-p180 | |
| - RUBY EXECUTABLE: /Users/lor/.rvm/rubies/ruby-1.9.2-p180/bin/ruby | |
| - EXECUTABLE DIRECTORY: /Users/lor/.rvm/gems/ruby-1.9.2-p180/bin | |
| - RUBYGEMS PLATFORMS: | |
| - ruby | |
| - x86_64-darwin-10 | |
| - GEM PATHS: | |
| - /Users/lor/.rvm/gems/ruby-1.9.2-p180 | |
| - /Users/lor/.rvm/gems/ruby-1.9.2-p180@global | |
| - GEM CONFIGURATION: | |
| - :update_sources => true | |
| - :verbose => true | |
| - :benchmark => false | |
| - :backtrace => false | |
| - :bulk_threshold => 1000 | |
| - "gem" => "--no-rdoc --no-ri" | |
| - REMOTE SOURCES: | |
| - http://rubygems.org/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment