Make abstract optional
This commit is contained in:
parent
798998b73f
commit
c1db82f19a
4 changed files with 3 additions and 5 deletions
|
|
@ -30,7 +30,6 @@ class Event < ActiveRecord::Base
|
|||
validate :abstract_limit
|
||||
validate :before_end_of_conference, on: :create
|
||||
validates :title, presence: true
|
||||
validates :abstract, presence: true
|
||||
validates :event_type, presence: true
|
||||
validates :program, presence: true
|
||||
validates :max_attendees, numericality: { only_integer: true, greater_than_or_equal_to: 1, allow_nil: true }
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
= difficulty_level.description
|
||||
|
||||
= f.input :abstract, input_html: { rows: 5 },
|
||||
required: true, hint: link_to('Tips to improve your presentations', 'http://blog.hubspot.com/blog/tabid/6307/bid/5975/10-Rules-to-Instantly-Improve-Your-Presentations.aspx')
|
||||
hint: link_to('Tips to improve your presentations', 'http://blog.hubspot.com/blog/tabid/6307/bid/5975/10-Rules-to-Instantly-Improve-Your-Presentations.aspx')
|
||||
|
||||
%p
|
||||
You have used
|
||||
|
|
|
|||
|
|
@ -43,8 +43,8 @@
|
|||
:javascript
|
||||
$("##{@program.event_types.first.id}-help").collapse('show');
|
||||
|
||||
= f.input :abstract, input_html: { rows: 5, required: true },
|
||||
required: true, hint: link_to('Tips to improve your presentations', 'http://blog.hubspot.com/blog/tabid/6307/bid/5975/10-Rules-to-Instantly-Improve-Your-Presentations.aspx')
|
||||
= f.input :abstract, input_html: { rows: 5},
|
||||
hint: link_to('Tips to improve your presentations', 'http://blog.hubspot.com/blog/tabid/6307/bid/5975/10-Rules-to-Instantly-Improve-Your-Presentations.aspx')
|
||||
|
||||
%p
|
||||
You have used
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ describe Event do
|
|||
end
|
||||
|
||||
it { is_expected.to validate_presence_of(:title) }
|
||||
it { is_expected.to validate_presence_of(:abstract) }
|
||||
it { is_expected.to validate_presence_of(:program) }
|
||||
it { is_expected.to validate_presence_of(:event_type) }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue