hi,
i just have this error, can anyone tell me what it means and how i can
fix it thanks.
NameError in HomeController#index
uninitialized constant Student
RAILS_ROOT: ./script/../config/..
Application Trace | Framework Trace | Full Trace
This error occured while loading the following files:
student.rb
Request
Parameters: None
Show session dump
---
user: !ruby/object:User
attributes:
id: "13"
password: 2afdef3e1ba036aa45b6a63421a075aabdbdef19
login: alaa_z
flash: !map:ActionController::Flash::FlashHash {}
Response
Headers: {"cookie"=>[],
"Cache-Control"=>"no-cache"}
--
Posted via http://www.ruby-forum.com/.
Can you supply some more info. What do your user and student models look like? bash wrote:> hi, > i just have this error, can anyone tell me what it means and how i can > fix it thanks. > > NameError in HomeController#index > uninitialized constant Student > RAILS_ROOT: ./script/../config/.. > > Application Trace | Framework Trace | Full Trace > > This error occured while loading the following files: > student.rb > Request > Parameters: None > > Show session dump > > --- > user: !ruby/object:User > attributes: > id: "13" > password: 2afdef3e1ba036aa45b6a63421a075aabdbdef19 > login: alaa_z > flash: !map:ActionController::Flash::FlashHash {} > > > Response > Headers: {"cookie"=>[], "Cache-Control"=>"no-cache"} > >
Chris T wrote:> Can you supply some more info. What do your user and student models look > like?user model is just for login which does encryption for the password before save it in the database. student model is empty:is just contains: class Student < ActiveRecord::Base end i juust tried to get the id of the user to use it to deisplay the information about the specific student -- Posted via http://www.ruby-forum.com/.
bash wrote:> Chris T wrote: >> Can you supply some more info. What do your user and student models look >> like? > > user model is just for login which does encryption for the password > before save it in the database. student model is empty:is just contains: > class Student < ActiveRecord::Base > end > i juust tried to get the id of the user to use it to deisplay the > information about the specific studentRuby cant find any class named "Student". As long as student.rb is in app/models you should be golden. -- Posted via http://www.ruby-forum.com/.