Fix bug.
This commit is contained in:
parent
de7b095c67
commit
faedbd4a11
|
@ -44,7 +44,7 @@ class AnnouncementsController < ApplicationController
|
|||
"source-site-link" => "",
|
||||
"subtitle" => a.subtitle,
|
||||
"statuses" => statuses,
|
||||
"category" => a.category.title,
|
||||
"category" => (a.category.title rescue ""),
|
||||
"postdate" => a.postdate,
|
||||
"author" => author,
|
||||
"is_top" => (a.is_top? ? 1 : 0),
|
||||
|
@ -575,7 +575,7 @@ class AnnouncementsController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
return {} if announcement.category.disable
|
||||
return {} if (announcement.category.disable rescue false)
|
||||
|
||||
tags = announcement.tags.map{|tag| {
|
||||
"tag" => tag.name ,
|
||||
|
@ -788,7 +788,7 @@ class AnnouncementsController < ApplicationController
|
|||
"source-site-link" => "",
|
||||
"subtitle" => a.subtitle,
|
||||
"statuses" => statuses,
|
||||
"category" => a.category.title,
|
||||
"category" => (a.category.title rescue ""),
|
||||
"postdate" => a.postdate,
|
||||
"author" => author,
|
||||
"is_top" => (a.is_top? ? 1 : 0),
|
||||
|
|
|
@ -65,7 +65,8 @@ class Bulletin
|
|||
field :open_comment, :type => Boolean, :default => false
|
||||
field :comment_end_time, :type => DateTime
|
||||
field :comment_role, :type => Array, :default => []
|
||||
|
||||
field :enable_sub_annc, :type => Boolean, :default => false
|
||||
field :sub_annc_list, :type => Array, :default => []
|
||||
mount_uploader :image, ImageUploader
|
||||
|
||||
has_many :bulletin_links, :autosave => true, :dependent => :destroy
|
||||
|
|
|
@ -169,7 +169,7 @@
|
|||
<div class="annc-comments-nickname">by <%= comment.account %></div>
|
||||
<br>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end rescue nil %>
|
||||
<% if action_data['show_comment_flag'] %>
|
||||
<div class="annc-comment-div">
|
||||
<div data-ph="<%= t('announcement.comment') %>" contenteditable="true" class="announcement-comment"></div>
|
||||
|
@ -177,4 +177,4 @@
|
|||
<%= t('announcement.send_comment') %>
|
||||
</button>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end rescue nil %>
|
Loading…
Reference in New Issue