flag_important

This commit is contained in:
Andreas Stephanides
2015-05-13 15:14:02 +02:00
parent 7b6d2eb57e
commit c86b175250
2 changed files with 5 additions and 1 deletions

View File

@@ -138,6 +138,9 @@ class Neuigkeit < ActiveRecord::Base
unless self.published? unless self.published?
self.update_column(:cache_order, self.cache_order-14) self.update_column(:cache_order, self.cache_order-14)
end end
if self.flag_important
self.update_column(:cache_order, self.cache_order-10)
end
self.update_column(:cache_is_published, self.published?) self.update_column(:cache_is_published, self.published?)
end end
private private

View File

@@ -12,6 +12,7 @@
<div class="span6"> <div class="span6">
<% f.input :datum, :as=> :datepicker %> <% f.input :datum, :as=> :datepicker %>
<%= f.input :rubrik, :as=> :radio, :collection=>Rubrik.all %> <%= f.input :rubrik, :as=> :radio, :collection=>Rubrik.all %>
<% f.input :flag_important %>
</div> </div>
<div class="span6"> <div class="span6">
<%= f.input :author, :as=> :select %> <%= f.input :author, :as=> :select %>