neerajdotname-active_record_no_table 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/History.txt +6 -0
  2. data/lib/active_record_no_table.rb +25 -24
  3. metadata +1 -1
data/History.txt CHANGED
@@ -1,3 +1,9 @@
1
+
2
+
3
+ === 0.0.2 2009-06-31
4
+
5
+ * fixing the bug regarding rails 2.1.x
6
+
1
7
  === 0.0.1 2009-06-30
2
8
 
3
9
  * Initial release
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neerajdotname-active_record_no_table
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Neeraj Singh