IM at chapter 2 exercises and then he asked if you can try this :
class User < ActiveRecord::Base
has_many :microposts
validates FILL_IN, presence: true
validates FILL_IN, presence: true
end
but as soon as I do rails s I see this error messages :
Started GET “/users/4” for 82.74.205.109 at 2014-11-28 13:55:51 +0000
Processing by UsersController#show as HTML
Parameters: {“id”=>“4”}
User Load (0.4ms) SELECT “users”.* FROM “users” WHERE “users”.“id” =
?
LIMIT 1 [[“id”, 4]]
Rendered users/show.html.erb within layouts/application (1.3ms)
Completed 200 OK in 116ms (Views: 98.6ms | ActiveRecord: 0.4ms)
Started GET “/users” for 82.74.205.109 at 2014-11-28 13:55:53 +0000
Processing by UsersController#index as HTML
User Load (0.3ms) SELECT “users”.* FROM “users”
Rendered users/index.html.erb within layouts/application (4.7ms)
Completed 200 OK in 122ms (Views: 120.1ms | ActiveRecord: 0.3ms)
Started GET “/” for 82.74.205.109 at 2014-11-28 13:56:15 +0000
Processing by UsersController#index as HTML
Completed 500 Internal Server Error in 7ms
NameError (uninitialized constant User::FILL_IN):
app/models/user.rb:5:in <class:User>' app/models/user.rb:1:in
<top (required)>’
app/controllers/users_controller.rb:7:in `index’
Rendered
/usr/local/rvm/gems/ruby-2.1.4@rails4/gems/web-console-2.0.0.beta3/lib/action_dispatch/templates/rescues/_source.erb
(6.7ms)
Rendered
/usr/local/rvm/gems/ruby-2.1.4@rails4/gems/web-console-2.0.0.beta3/lib/action_dispatch/templates/rescues/_trace.html.erb
(3.9ms)
Rendered
/usr/local/rvm/gems/ruby-2.1.4@rails4/gems/web-console-2.0.0.beta3/lib/action_dispatch/templates/rescues/_request_and_response.html.erb
(1.6ms)
Rendered
/usr/local/rvm/gems/ruby-2.1.4@rails4/gems/web-console-2.0.0.beta3/lib/action_dispatch/templates/rescues/_web_console.html.erb
(1.2ms)
Rendered
/usr/local/rvm/gems/ruby-2.1.4@rails4/gems/web-console-2.0.0.beta3/lib/action_dispatch/templates/rescues/diagnostics.html.erb
within rescues/layout (143.2ms)
Is this a error in the tutorial or have I done something wrong ?
Roelof