fix error
This commit is contained in:
parent
ab6b79eb29
commit
0660a12bff
|
@ -128,11 +128,7 @@ class Admin::PropertyHiresController < OrbitAdminController
|
||||||
end
|
end
|
||||||
|
|
||||||
def settings
|
def settings
|
||||||
if PropertyHireSetting.count == 0
|
@settings = PropertyHireSetting.first
|
||||||
@settings = PropertyHireSetting.create
|
|
||||||
else
|
|
||||||
@settings = PropertyHireSetting.first
|
|
||||||
end
|
|
||||||
if request.request_method == "PATCH"
|
if request.request_method == "PATCH"
|
||||||
@settings.update_attributes(settings_params.except("property_day_settings"))
|
@settings.update_attributes(settings_params.except("property_day_settings"))
|
||||||
@settings.save
|
@settings.save
|
||||||
|
|
|
@ -11,6 +11,13 @@ module PropertyHire
|
||||||
authorizable
|
authorizable
|
||||||
frontend_enabled
|
frontend_enabled
|
||||||
data_count 1..30
|
data_count 1..30
|
||||||
|
require File.expand_path('../../../app/models/property_hire_setting', __FILE__)
|
||||||
|
if defined?(PropertyHireSetting)
|
||||||
|
if PropertyHireSetting.count == 0
|
||||||
|
PropertyHireSetting.create
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if File.basename($0) != 'rake'
|
if File.basename($0) != 'rake'
|
||||||
begin
|
begin
|
||||||
avoid_page_cache HireEmailSet
|
avoid_page_cache HireEmailSet
|
||||||
|
|
Loading…
Reference in New Issue