Merge pull request 'Fix bug.' (#4) from 123/seminar:master into master
Reviewed-on: #4
This commit is contained in:
commit
651f6cb29c
|
@ -8,7 +8,7 @@ Rails.application.routes.draw do
|
||||||
s = Site.first
|
s = Site.first
|
||||||
update_flag = s.respond_to?(:tmp_flags)
|
update_flag = s.respond_to?(:tmp_flags)
|
||||||
need_update1 = update_flag && !(s.tmp_flags.include?('fix_sr'))
|
need_update1 = update_flag && !(s.tmp_flags.include?('fix_sr'))
|
||||||
need_update2 = !update_flag || !(s.tmp_flags.include?('sm1'))
|
need_update2 = !update_flag || !(s.tmp_flags.include?('smer1'))
|
||||||
if need_update1
|
if need_update1
|
||||||
Page.where(:bind_model=>"SeminarMain",:all_pageids=>nil).each do |p|
|
Page.where(:bind_model=>"SeminarMain",:all_pageids=>nil).each do |p|
|
||||||
p.save
|
p.save
|
||||||
|
@ -23,7 +23,7 @@ Rails.application.routes.draw do
|
||||||
end
|
end
|
||||||
if update_flag
|
if update_flag
|
||||||
s = Site.first
|
s = Site.first
|
||||||
s.tmp_flags << 'sm1'
|
s.tmp_flags << 'smer1'
|
||||||
s.save
|
s.save
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue