Colin Law wrote in post #975776:
> On 18 January 2011 16:59, Simon M. <[email protected]> wrote:
>> Hi
>>
>> Could anybody help me resolve this error?, i have copy n pasted my
>> controler and activerecord below as well.....Here is the error medssage
>>
>>
>> NoMethodError in Register_user#index
>> Showing app/views/register_user/index.html.erb where line #4 raised:
>>
>> undefined method `screen_name' for #<User:0x13027a3>
>
> Note the class name here, User.
>
>> 6: </ol>
>>      if @user.save
>>   @title = "Temporary View"
>>
>>
>> end
>> --------------------------------------
>>
>> DATABASE
>>
>> class CreateRegisterUsers < ActiveRecord::Migration
>> def self.up
>>  create_table :register_users do |t|
>
> This is creating a table register_users, so the class containing a
> screen_name column is RegisterUser not User, unless you have
> overridden this in class User.
>
> Colin


Hi thanks for the response, ah,your right because i had to create the 
model, view, controller as register_user instead of user(which was how 
it was done from a tutorial!, I copied the code form that same tutorial)

it just that i get aload error message when i change it to RegisterUser 
and a name error message when i then tried register_user as well



So i have to change user ro RegisterUser everywhere in the controller 
views etc?

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to