Fix bug.
This commit is contained in:
parent
7530a44da4
commit
a8bc48eef4
|
@ -28,7 +28,7 @@ class Admin::AnnouncementsController < OrbitAdminController
|
|||
def update_sort_setting
|
||||
setting = @announcement_setting
|
||||
setting.update_attributes(settings_params)
|
||||
if defined?(OrbitHelper::SharedHash)
|
||||
if defined?(OrbitHelper::SharedHash) && OrbitHelper::SharedHash
|
||||
OrbitHelper::SharedHash['announcement'][:enable_manually_sort] = setting.enable_manually_sort
|
||||
end
|
||||
redirect_to edit_sort_admin_announcement_path
|
||||
|
|
|
@ -9,7 +9,7 @@ class AnnouncementsController < ApplicationController
|
|||
end
|
||||
|
||||
def manually_sort
|
||||
if defined?(OrbitHelper::SharedHash)
|
||||
if defined?(OrbitHelper::SharedHash) && OrbitHelper::SharedHash
|
||||
OrbitHelper::SharedHash['announcement'][:enable_manually_sort] rescue AnnouncementSetting.first.enable_manually_sort
|
||||
else
|
||||
AnnouncementSetting.first.enable_manually_sort rescue false
|
||||
|
|
Loading…
Reference in New Issue