seekshiva / courses

http://courseshub.in
GNU General Public License v3.0
5 stars 3 forks source link

Code duplication (SessionsController#create) #118

Open seekshiva opened 10 years ago

seekshiva commented 10 years ago

RegistrationsController#create is the unused duplicate code of SessionsController#create. Both methods have the same functionality, but only one of them is used in the app now.

Which one should we continue to use?

nobelium commented 10 years ago

RegistrationsController#create is the actual code that registers an user and sends a welcome mail. SessionsController#create was written by you to help you with devise tests. Its your call.

seekshiva commented 10 years ago

IIRC, RegistrationsController#create was never accessible anywhere from the app.

Registering the user and sending welcome mail was done at HomeController#authenticate, which I have now moved to SessionsController#create

nobelium commented 10 years ago

Yeah. but there is a line in route file which mentions RegistrationsController#create