Hi (I am a beginner)
I have a project that add users, profiles, etc.
I genetered it using scaffold. It's everything ok up here.
I need to do the crud operations in a service class and not in the
controllers.
I created a services folder into App folder and create a UserService.rb
class .
So the idea is that the controller call to UserService class , and the
userService Class do the crud(create, read, update, delete) operation.
But I got this error message : uninitialized constant
UsersController::UserService .
I tried add a instance to routes.rb , also to application.rb but the
error is still there.
I have searched many examples and tried many things, but can not find
solution.
Any suggestions?
PD: Sorry for my English :)
--
Posted via
http://www.ruby-forum.com/.