Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge remote branch 'teamon/master'

Conflicts:
	Rakefile
	merb-auth-slice-password-reset.gemspec
  • Loading branch information...
commit 3bec4023f1abadd6d0d7d738c173aafcbb183f6c 2 parents eb32254 + 29f72b8
@merbjedi authored
View
2  Rakefile
@@ -11,7 +11,7 @@ EMAIL = "has.sox@gmail.com"
HOMEPAGE = "http://merbivore.com/"
SUMMARY = "Password reset for Merb Auth"
DESCRIPTION = "Merb Slice that adds basic password-reset functionality to merb-auth-based merb applications."
-GEM_VERSION = "0.9.12"
+GEM_VERSION = "0.9.13"
spec = Gem::Specification.new do |s|
s.rubyforge_project = 'merb'
View
2  app/controllers/passwords.rb
@@ -31,7 +31,7 @@ def redirect_after_password_reset
end
def redirect_after_sending_confirmation
- redirect "/", :message => {:notice => "Password Reset confirmaation sent".t}
+ redirect "/", :message => {:notice => "Password reset confirmation sent".t}
end
end # MerbAuthSlicePasswordReset::Passwords
View
3  lib/merb-auth-slice-password-reset/mixins/senile_user.rb
@@ -29,6 +29,9 @@ def self.included(base)
elsif defined?(Sequel) && ancestors.include?(Sequel::Model)
require path / "sq_senile_user"
extend(Merb::Authentication::Mixins::SenileUser::SQClassMethods)
+ elsif MongoMapper::Document > self
+ require path / "mm_senile_user"
+ extend(Merb::Authentication::Mixins::SenileUser::MMClassMethods)
end
end # base.class_eval
View
22 lib/merb-auth-slice-password-reset/mixins/senile_user/mm_senile_user.rb
@@ -0,0 +1,22 @@
+module Merb
+ class Authentication
+ module Mixins
+ module SenileUser
+ module MMClassMethods
+ def self.extended(base)
+ base.class_eval do
+ key :password_reset_code, String
+ end # base.class_eval
+ def find_with_password_reset_code(code)
+ find(:first, :conditions => {:password_reset_code => code})
+ end
+
+ def find_with_login_param(param_name, value)
+ find(:first, :conditions => {param_name => value})
+ end
+ end # self.extended
+ end # MMClassMethods
+ end # SenileUser
+ end # Mixins
+ end # Authentication
+end #Merb
View
2  stubs/app/controllers/passwords.rb
@@ -7,7 +7,7 @@ def redirect_after_password_reset
end
def redirect_after_sending_confirmation
- redirect "/", :message => {:notice => "Password Reset confirmaation sent".t}
+ redirect "/", :message => {:notice => "Password reset confirmation sent".t}
end
end # MerbAuthSlicePasswordReset::Passwords
Please sign in to comment.
Something went wrong with that request. Please try again.