1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
diff --git a/config/initializers/02_extensions.rb b/config/initializers/02_extensions.rb
index 7f20f24fee..c66c417911 100644
--- a/config/initializers/02_extensions.rb
+++ b/config/initializers/02_extensions.rb
@@ -1,3 +1,27 @@
# Disable XML parameter parsing, see:
# http://www.insinuator.net/2013/01/rails-yaml/
-ActionDispatch::ParamsParser::DEFAULT_PARSERS.delete(Mime::XML)
+ActionDispatch::ParamsParser::DEFAULT_PARSERS.delete(Mime::XML)
+
+# Patches for Ruby 2.4
+class ActiveSupport::Duration
+ def coerce(other)
+ [other, to_i]
+ end
+end
+
+require 'arel'
+module Arel
+ module Visitors
+ class Dot
+ alias :visit_Integer :visit_String
+ end
+
+ class ToSql
+ alias :visit_Integer :literal
+ end
+
+ class DepthFirst
+ alias :visit_Integer :terminal
+ end
+ end
+end
diff --git a/db/migrate/20110125100508_tags.rb b/db/migrate/20110125100508_tags.rb
index fdfd0ef53a..1967aff57b 100644
--- a/db/migrate/20110125100508_tags.rb
+++ b/db/migrate/20110125100508_tags.rb
@@ -4,8 +4,8 @@ class TagsMigration < Sequel::Migration
create_table :tags do
primary_key :id
String :name, :null => false
- Fixnum :user_id, :null => false, :index => true
- Fixnum :table_id, :null => false, :index => true
+ Integer :user_id, :null => false, :index => true
+ Integer :table_id, :null => false, :index => true
index [:user_id, :table_id, :name], :unique => true
end
end
|