Specify correct default values for events
This commit is contained in:
parent
cd44861988
commit
167030f90d
|
@ -29,6 +29,10 @@ class Event < ActiveRecord::Base
|
||||||
proposer.personal_profile(conference)
|
proposer.personal_profile(conference)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def length
|
||||||
|
read_attribute(:length) || event_type.try(:minimum_length)
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def track_belongs_to_the_selected_conference
|
def track_belongs_to_the_selected_conference
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
class DropDefaultValueForLengthInEvents < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
change_column_default(:events, :length, nil)
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in New Issue