hotsh / rstat.us

Simple microblogging network based on the ostatus protocol.
http://rstat.us/
Other
724 stars 215 forks source link

refactor Users#reset_password_create action to reduce complexity #792

Closed hindenbug closed 10 years ago

hindenbug commented 10 years ago

Extract password reset logic in PasswordService class.

Any feedback on this? :smile:

colindean commented 10 years ago

I didn't test it myself, but it looks good to me.

wilkie commented 10 years ago

The recent Travis environment change hiccuped on our Gemfile again. Nothing in your code should be invalid for that ruby version though. Looks great!

Aside: The strings embedded in that lib class remind me that we still need a solution for issue #568

Thank you for this! Refactors are greatly appreciated! :heart:

hindenbug commented 10 years ago

@wilkie @colindean Thanks for the review comments :) Totally agree, those "string" messages look ugly sitting there :bomb:

wilkie commented 10 years ago

Something like gettext or the i18n gem would make it uglier, but it is one of those useful types of ugly code. :)