refinerycms-sl-calendar 2.0.6.2 → 2.0.6.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -19,12 +19,12 @@
|
|
19
19
|
|
20
20
|
<div class='field'>
|
21
21
|
<%= f.label :from -%>
|
22
|
-
<%=
|
22
|
+
<%= text_field_tag "event[from]", l(@event.starts_at || Time.now, :format => "%Y-%m-%d %I:%M %p"), :class => 'datetime_range' -%>
|
23
23
|
</div>
|
24
24
|
|
25
25
|
<div class='field'>
|
26
26
|
<%= f.label :to -%>
|
27
|
-
<%=
|
27
|
+
<%= text_field_tag "event[to]", l(@event.ends_at || Time.now, :format => "%Y-%m-%d %I:%M %p"), :class => 'datetime_range' -%>
|
28
28
|
</div>
|
29
29
|
|
30
30
|
<div class='field'>
|
@@ -4,22 +4,22 @@ class ChangeFromToAttributesInEvents < ActiveRecord::Migration
|
|
4
4
|
add_column :refinery_calendar_events, :starts_at, :datetime
|
5
5
|
add_column :refinery_calendar_events, :ends_at, :datetime
|
6
6
|
|
7
|
-
Refinery::Calendar::Event.update_all '
|
7
|
+
Refinery::Calendar::Event.update_all '`starts_at` = `from`, `ends_at` = `to`'
|
8
8
|
|
9
|
-
remove_column :refinery_calendar_events, :from
|
10
|
-
remove_column :refinery_calendar_events, :to
|
9
|
+
remove_column :refinery_calendar_events, :from
|
10
|
+
remove_column :refinery_calendar_events, :to
|
11
11
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def down
|
15
15
|
|
16
|
-
add_column :refinery_calendar_events, :
|
17
|
-
add_column :refinery_calendar_events, :
|
16
|
+
add_column :refinery_calendar_events, :from, :date
|
17
|
+
add_column :refinery_calendar_events, :to, :date
|
18
18
|
|
19
|
-
Refinery::Calendar::Event.update_all '
|
19
|
+
Refinery::Calendar::Event.update_all '`from` = `starts_at`, `to` = `ends_at`'
|
20
20
|
|
21
|
-
remove_column :refinery_calendar_events, :
|
22
|
-
remove_column :refinery_calendar_events, :
|
21
|
+
remove_column :refinery_calendar_events, :starts_at
|
22
|
+
remove_column :refinery_calendar_events, :ends_at
|
23
23
|
|
24
24
|
end
|
25
25
|
end
|
data/readme.md
CHANGED