Site rescue nil

This commit is contained in:
saurabhbhatia 2013-12-04 17:48:23 +08:00
parent 53a51cc796
commit 23071a364d
2 changed files with 2 additions and 2 deletions

View File

@ -19,7 +19,7 @@ class Site
field :sitemap_menu_in_header, :type => Boolean, :default => false field :sitemap_menu_in_header, :type => Boolean, :default => false
field :enable_terms_of_use, :type => Boolean, :default => false field :enable_terms_of_use, :type => Boolean, :default => false
field :enable_language_detection, :type => Boolean, :default => false field :enable_language_detection, :type => Boolean, :default => false
field :announcement_category, :type => Array field :announcement_category, :type => Array, :default=>[]
field :title_always_on, :type => Boolean, :default => false field :title_always_on, :type => Boolean, :default => false
field :dashbroad_allow_visitor, :type => Boolean, :default => false field :dashbroad_allow_visitor, :type => Boolean, :default => false

View File

@ -30,7 +30,7 @@
<label class="control-label muted">Select Announcement Categories</label> <label class="control-label muted">Select Announcement Categories</label>
<div class="controls"> <div class="controls">
<% @module.categories.each do |category| %> <% @module.categories.each do |category| %>
<%= check_box_tag "site[announcement_category][]", category.id.to_s, @site.announcement_category.include?(category), :class=>"toggle-check", :data => { :title => "#{category.title}", disabled: true }, "data-deploy"=>"inline", :checked => (@site.announcement_category.include?(category.id.to_s)) %> <%= check_box_tag "site[announcement_category][]", category.id.to_s, (@site.announcement_category.include?(category) rescue false), :class=>"toggle-check", :data => { :title => "#{category.title}", disabled: true }, "data-deploy"=>"inline", :checked => (@site.announcement_category.include?(category.id.to_s)) %>
<% end %> <% end %>
</div> </div>
</div> </div>