fixed some issue
This commit is contained in:
parent
65d2a47c32
commit
fc05dcf303
|
@ -2,7 +2,6 @@ class Dayoff < PersonalPluginIntro
|
|||
|
||||
include Mongoid::Document
|
||||
include Mongoid::Timestamps
|
||||
# validates :dayoff_description, :presence => true
|
||||
|
||||
belongs_to :member_log, :dependent => :destroy
|
||||
|
||||
|
@ -11,5 +10,7 @@ class Dayoff < PersonalPluginIntro
|
|||
field :start_dayoff, :type => DateTime
|
||||
field :end_dayoff, :type => DateTime
|
||||
|
||||
validates :start_dayoff, :presence => true
|
||||
validates :end_dayoff, :presence => true
|
||||
|
||||
end
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
<div class="alert alert-error">
|
||||
<% @dayoffs.each do |b| %>
|
||||
<% if Time.now <= b.end_dayoff.to_date+40 %>
|
||||
<% if Time.now.to_date <= b.end_dayoff.to_date+40 %>
|
||||
<ul>
|
||||
【<%= b.dayoff_description %>】
|
||||
<%= b.start_dayoff.strftime('%Y-%m-%d') %>~
|
||||
|
|
Loading…
Reference in New Issue