Fix bug.
This commit is contained in:
parent
9aecf5963c
commit
3ba5d512cf
|
@ -805,6 +805,5 @@ class ApplicationFormsController < ApplicationController
|
|||
template_data:{'application_form_id'=>application_form_id,'locale'=>I18n.locale,'extra_text'=> extra_text}.merge(extra_data),
|
||||
mail_lang: I18n.locale)
|
||||
end
|
||||
mail.save
|
||||
end
|
||||
end
|
||||
|
|
|
@ -65,10 +65,9 @@ class ApplicationFormSignup
|
|||
self.process_stage = enable_idx.nil? ? 0 : (enable_idx + 1)
|
||||
end
|
||||
if self.serial_number.nil?
|
||||
s = ApplicationFormSetting.first
|
||||
s.last_serial_number += 1
|
||||
self.serial_number = s.last_serial_number
|
||||
s.save(:validate=>false)
|
||||
last_serial_number = ApplicationFormSetting.max(:last_serial_number).to_i
|
||||
self.serial_number = last_serial_number + 1
|
||||
ApplicationFormSetting.update_all({"$inc"=>{"last_serial_number"=>1}})
|
||||
end
|
||||
end
|
||||
after_destroy do
|
||||
|
|
|
@ -2,6 +2,7 @@ Rails.application.routes.draw do
|
|||
|
||||
locales = Site.first.in_use_locales rescue I18n.available_locales
|
||||
Thread.new do
|
||||
ApplicationFormEmailSet.where(:field_name=>nil).destroy
|
||||
end
|
||||
scope "(:locale)", locale: Regexp.new(locales.join("|")) do
|
||||
namespace :admin do
|
||||
|
|
Loading…
Reference in New Issue