neerajdotname-active_record_no_table 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +6 -0
- data/lib/active_record_no_table.rb +25 -24
- metadata +1 -1
data/History.txt
CHANGED
|
@@ -3,30 +3,6 @@ $:.unshift(File.dirname(__FILE__)) unless
|
|
|
3
3
|
|
|
4
4
|
require 'rubygems'
|
|
5
5
|
|
|
6
|
-
if Rails.version >= "2.3.0"
|
|
7
|
-
module ActiveRecord
|
|
8
|
-
class NoTable
|
|
9
|
-
include Validateable_2_3
|
|
10
|
-
end
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
elsif Rails.version >= '2.2.0'
|
|
14
|
-
module ActiveRecord
|
|
15
|
-
class NoTable
|
|
16
|
-
include Validateable_2_2
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
elsif Rails.version >= '2.1.0'
|
|
21
|
-
module ActiveRecord
|
|
22
|
-
class NoTable
|
|
23
|
-
include Validateable_2_1
|
|
24
|
-
end
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
else
|
|
28
|
-
raise 'this plugin only works with Rails 2.1.x and higher'
|
|
29
|
-
end
|
|
30
6
|
|
|
31
7
|
module Validateable_2_1
|
|
32
8
|
[:save, :save!, :update_attribute].each{|attr| define_method(attr){}}
|
|
@@ -158,3 +134,28 @@ module Validateable_2_3
|
|
|
158
134
|
end
|
|
159
135
|
end
|
|
160
136
|
end
|
|
137
|
+
|
|
138
|
+
if Rails.version >= "2.3.0"
|
|
139
|
+
module ActiveRecord
|
|
140
|
+
class NoTable
|
|
141
|
+
include Validateable_2_3
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
elsif Rails.version >= '2.2.0'
|
|
146
|
+
module ActiveRecord
|
|
147
|
+
class NoTable
|
|
148
|
+
include Validateable_2_2
|
|
149
|
+
end
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
elsif Rails.version >= '2.1.0'
|
|
153
|
+
module ActiveRecord
|
|
154
|
+
class NoTable
|
|
155
|
+
include Validateable_2_1
|
|
156
|
+
end
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
else
|
|
160
|
+
raise 'this plugin only works with Rails 2.1.x and higher'
|
|
161
|
+
end
|