Usage Rails 3.0 beta 3 without ActiveRecord ORM

Posted by Anton on Stack Overflow See other posts from Stack Overflow or by Anton
Published on 2010-06-14T11:28:15Z Indexed on 2010/06/14 12:02 UTC
Read the original article Hit count: 262

Filed under:
|

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!

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about ruby