Usage Rails 3.0 beta 3 without ActiveRecord ORM
- by Anton
Hi everybody!
Just installed Rails 3.0 beta 3 in Windows 7.
And started playing with some easy examples
class SignupController < ApplicationController
def index
@user = User.new(params[:user])
if method.post? and @user.save
redirect_to :root
end
end
end
class User
def initialize(params = {})
@email = params[:email]
@passw = params[:password]
end
def save
end
end
<div align="center">
<% form_for :user do |form| %>
<%= form.label :email %>
<%= form.text_field :email %><br />
<%= form.label :password %>
<%= form.text_field :password %><br />
<%= form.submit :Register! %>
<% end %>
</div>
When I go to /signup I'm getting this error
ArgumentError in SignupController#index
wrong number of arguments(0 for 1)
Is there a problem with constructor or what's wrong?Please, need your help!