mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-13 18:55:45 -04:00
Merge branch 'dev' into bw/bar_graphs
This commit is contained in:
@@ -319,9 +319,6 @@ $state-success-bg: lighten($green, 50%)
|
||||
text-overflow: ellipsis
|
||||
overflow: hidden
|
||||
|
||||
#gardens_panel_body
|
||||
height: 20em
|
||||
|
||||
.form-group.required .control-label:before
|
||||
content: "* "
|
||||
color: red
|
||||
|
||||
@@ -138,7 +138,7 @@ class CropsController < ApplicationController
|
||||
end
|
||||
unless current_member.role? :crop_wrangler
|
||||
Role.crop_wranglers.each do |w|
|
||||
Notifier.new_crop_request(w, @crop).deliver_later!
|
||||
Notifier.new_crop_request(w, @crop).deliver_now!
|
||||
end
|
||||
end
|
||||
|
||||
@@ -166,8 +166,8 @@ class CropsController < ApplicationController
|
||||
if previous_status == "pending"
|
||||
requester = @crop.requester
|
||||
new_status = @crop.approval_status
|
||||
Notifier.crop_request_approved(requester, @crop).deliver_later! if new_status == "approved"
|
||||
Notifier.crop_request_rejected(requester, @crop).deliver_later! if new_status == "rejected"
|
||||
Notifier.crop_request_approved(requester, @crop).deliver_now! if new_status == "approved"
|
||||
Notifier.crop_request_rejected(requester, @crop).deliver_now! if new_status == "rejected"
|
||||
end
|
||||
format.html { redirect_to @crop, notice: 'Crop was successfully updated.' }
|
||||
format.json { head :no_content }
|
||||
|
||||
@@ -21,6 +21,6 @@ class Notification < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def send_email
|
||||
Notifier.notify(self).deliver_later if recipient.send_notification_email
|
||||
Notifier.notify(self).deliver_now! if recipient.send_notification_email
|
||||
end
|
||||
end
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace :growstuff do
|
||||
|
||||
if Date.today.cwday == send_on_day and Date.today.cweek % every_n_weeks == 0
|
||||
Member.confirmed.find_each do |m|
|
||||
Notifier.planting_reminder(m).deliver_later!
|
||||
Notifier.planting_reminder(m).deliver_now!
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user