Skip to content

Commit

Permalink
got rid of rails/init as it's deprecated
Browse files Browse the repository at this point in the history
call the deliver methods correctly
  • Loading branch information
pelle committed Apr 24, 2010
1 parent f6a4589 commit e690860
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion init.rb
Original file line number Diff line number Diff line change
@@ -1 +1 @@
require 'rails/init'
require 'devise_invitable'
4 changes: 2 additions & 2 deletions lib/devise_invitable/model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ def invited?

# Send invitation by email
def send_invitation
::DeviseMailer.deliver_invitation(self)
::Devise::Mailer.invitation(self).deliver
end

# Reset invitation token and send invitation again
def resend_invitation!
if new_record? || invited?
self.skip_confirmation! if self.new_record? and self.respond_to? :skip_confirmation!
generate_invitation_token
save(false)
save(:validate=>false)
send_invitation
end
end
Expand Down
1 change: 0 additions & 1 deletion rails/init.rb

This file was deleted.

2 changes: 1 addition & 1 deletion test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

path = File.join(File.dirname(__FILE__), '..', 'app', 'views')
ActionController::Base.view_paths << path
DeviseMailer.view_paths << path
Devise::Mailer.view_paths << path

ActionMailer::Base.delivery_method = :test
ActionMailer::Base.perform_deliveries = true
Expand Down

0 comments on commit e690860

Please sign in to comment.