views:

66

answers:

2

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"
  gem "autotest-fsevent"
  gem "ruby-debug19"
end
+1  A: 

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

mportiz08
I'll try that out but the docs say:
David Henner
<%= form_for(@user, :as => :user) do |f| %>
David Henner
Yeap... your right. Thank you!!!
David Henner
no problem--i ran into a similar problem not too long ago
mportiz08
A: 

Darn... I thought this was working... Turns out it worked for form_tag but not form_for. I wonder if formtastic is over-riding something.

Any help would be appreciated.

Dave