diff --git a/app/models/dayoff.rb b/app/models/dayoff.rb index 45454f1..3d3928b 100644 --- a/app/models/dayoff.rb +++ b/app/models/dayoff.rb @@ -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 \ No newline at end of file diff --git a/app/views/plugin/memberlog/_profile.html.erb b/app/views/plugin/memberlog/_profile.html.erb index 1ea1d15..78e0eb7 100644 --- a/app/views/plugin/memberlog/_profile.html.erb +++ b/app/views/plugin/memberlog/_profile.html.erb @@ -17,7 +17,7 @@