announcement update with emtpy tag
This commit is contained in:
parent
1dfa7e91ee
commit
758ceaf5e3
|
@ -122,7 +122,7 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
|||
|
||||
def update
|
||||
@bulletin = Bulletin.find(params[:id])
|
||||
|
||||
params[:bulletin][:tag_ids] = (params[:bulletin][:tag_ids] ? params[:bulletin][:tag_ids] : [])
|
||||
delete_out_invalid_date_from_params
|
||||
respond_to do |format|
|
||||
if @bulletin.update_attributes(params[:bulletin])
|
||||
|
|
|
@ -100,7 +100,6 @@
|
|||
<% @tags.each do |tag| %>
|
||||
<label class="checkbox inline btn <%= 'active' if @bulletin.tag_ids.include?(tag.id) %>">
|
||||
<%= check_box_tag 'bulletin[tag_ids][]', tag.id, @bulletin.tag_ids.include?(tag.id) %> <%= tag.name %>
|
||||
<%= hidden_field_tag 'bulletin[tag_ids][]', '' %>
|
||||
</label>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue