开发者

Upgrade to Rails3 from Rails3.rc2, and forms are blank

Using ruby 1.9.2

if I change gem 'rails', '3.0.0.rc2' to gem 'rails', '3.0.0' None of my forms render.

My forms all use <%= %> and everything works great in rc2. I don't even get any errors.

<%= form_for(@user) do |f| %>
  Not even this text would render.... Its not even hidden on the page.
<% end %>

This is my GEMFILE:

gem 'rails', '3.0.0.rc2'

gem "activemerchant", '1.7.2'
gem 'acts_as_tree',    :git => 'git://github.com/parasew/acts_as_tree.git'
gem 'authlogic', "2.1.5"
gem 'cancan'#, '1.3.2'
gem 'compass', ">= 0.10.5" 

gem 'fancy-buttons'
gem "friendly_id", "~> 3.0"
gem 'formtastic',  "~> 1.1.0"
gem 'haml',  "= 3.0.13"

gem 'memcache-client'
gem 'ruby-mysql'
gem "nifty-generators"
gem 'paperclip'
gem 'prawn'

gem 'rmagick',    :require => 'RMagick'
gem 'sunspot'
gem 'sunspot_rails' 
gem 'ssl_requirement'
gem 'state_machine'
gem 'will_paginate', '~> 3.0.pre2'

group :development do 
  gem "autotest-rails-pure"开发者_JS百科
  gem "autotest-fsevent"
  gem "ruby-debug19"
end


I think the form_for helper works a little differently in rails 3.

<%= form_for(:user, @user) do |f| %>
  # whatever
<% end %>

where :user would be the name of the model and @user is the actual variable

http://guides.rubyonrails.org/form_helpers.html#binding-a-form-to-an-object

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜