diff --git a/app/controllers/maintenance/user/login_reminders_controller.rb b/app/controllers/maintenance/user/login_reminders_controller.rb index 4f86c2945..0657a1228 100644 --- a/app/controllers/maintenance/user/login_reminders_controller.rb +++ b/app/controllers/maintenance/user/login_reminders_controller.rb @@ -7,7 +7,7 @@ module Maintenance def create @user = ::User.with_email(params[:user][:email]).first if @user - LoginReminderMailer.notice(@user).deliver + LoginReminderMailer.notice(@user).deliver_now flash[:notice] = "Email sent" else flash[:notice] = "Email address not found" diff --git a/app/models/dmail.rb b/app/models/dmail.rb index 003795069..2c307bf15 100644 --- a/app/models/dmail.rb +++ b/app/models/dmail.rb @@ -181,7 +181,7 @@ class Dmail < ActiveRecord::Base def send_dmail if to.receive_email_notifications? && to.email.include?("@") && owner_id == to.id - UserMailer.dmail_notice(self).deliver + UserMailer.dmail_notice(self).deliver_now end end diff --git a/app/models/forum_subscription.rb b/app/models/forum_subscription.rb index 56b3611b1..40957a3d7 100644 --- a/app/models/forum_subscription.rb +++ b/app/models/forum_subscription.rb @@ -14,7 +14,7 @@ class ForumSubscription < ActiveRecord::Base CurrentUser.scoped(subscription.user, "127.0.0.1") do forum_posts = forum_topic.posts.where("created_at > ?", subscription.last_read_at).order("id desc") begin - UserMailer.forum_notice(subscription.user, forum_topic, forum_posts).deliver + UserMailer.forum_notice(subscription.user, forum_topic, forum_posts).deliver_now rescue Net::SMTPSyntaxError end subscription.update_attribute(:last_read_at, forum_topic.updated_at) diff --git a/app/models/note.rb b/app/models/note.rb index 11d3d1c83..30d37df8e 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -9,7 +9,7 @@ class Note < ActiveRecord::Base before_validation :blank_body validates_presence_of :post_id, :creator_id, :updater_id, :x, :y, :width, :height validate :post_must_exist - validate :note_within_image, :message => "must be inside the image" + validate :note_within_image after_save :update_post after_save :create_version validate :post_must_not_be_note_locked diff --git a/app/models/user.rb b/app/models/user.rb index caaf03313..a70b52e33 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -188,7 +188,7 @@ class User < ActiveRecord::Base def reset_password_and_deliver_notice new_password = reset_password() - Maintenance::User::PasswordResetMailer.confirmation(self, new_password).deliver + Maintenance::User::PasswordResetMailer.confirmation(self, new_password).deliver_now end end diff --git a/app/models/user_password_reset_nonce.rb b/app/models/user_password_reset_nonce.rb index 2daad4d75..b27f3a507 100644 --- a/app/models/user_password_reset_nonce.rb +++ b/app/models/user_password_reset_nonce.rb @@ -10,7 +10,7 @@ class UserPasswordResetNonce < ActiveRecord::Base end def deliver_notice - Maintenance::User::PasswordResetMailer.reset_request(user, self).deliver + Maintenance::User::PasswordResetMailer.reset_request(user, self).deliver_now end def initialize_key diff --git a/app/views/maintenance/user/password_reset_mailer/reset_request.html.erb b/app/views/maintenance/user/password_reset_mailer/reset_request.html.erb index 796c609e3..9f8652f8a 100644 --- a/app/views/maintenance/user/password_reset_mailer/reset_request.html.erb +++ b/app/views/maintenance/user/password_reset_mailer/reset_request.html.erb @@ -1,4 +1,4 @@
Someone has requested that the password for "<%= @user.name %>" for the website <%= Danbooru.config.app_name %> be reset. If you did not request this, then you can ignore this email.
-To reset your password, please visit <%= link_to "this link", edit_maintenance_user_password_reset_path(:host => Danbooru.config.hostname, :only_path => false, :key => @nonce.key, :email => @nonce.email) %>.
+To reset your password, please visit <%= link_to "this link", edit_maintenance_user_password_reset_url(:host => Danbooru.config.hostname, :only_path => false, :key => @nonce.key, :email => @nonce.email) %>.
diff --git a/app/views/user_mailer/dmail_notice.html.erb b/app/views/user_mailer/dmail_notice.html.erb index 3e47e5fce..b683419dd 100644 --- a/app/views/user_mailer/dmail_notice.html.erb +++ b/app/views/user_mailer/dmail_notice.html.erb @@ -10,6 +10,6 @@ <%= DText.parse(@dmail.body) %> -<%= link_to "View message", dmail_path(@dmail, :host => Danbooru.config.hostname, :only_path => false) %>
+<%= link_to "View message", dmail_url(@dmail, :host => Danbooru.config.hostname, :only_path => false) %>