public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
Search Repo:
Fixed documentation

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4078 
5ecf4fe2-1ee6-0310-87b1-e25e094e27de
dhh (author)
Mon Mar 27 19:06:40 -0800 2006
commit  fed7d334f2904afc0955a6496859a8779f3d965e
tree    c44df1dcf53cac1b72a7703e56a0da750f2d1b33
parent  3e734490c6b3cfa049ec95caa4b8e0bf745976fd
...
9
10
11
12
 
13
14
15
...
19
20
21
22
 
23
24
25
...
31
32
33
34
 
35
36
37
...
44
45
46
47
 
48
49
50
...
9
10
11
 
12
13
14
15
...
19
20
21
 
22
23
24
25
...
31
32
33
 
34
35
36
37
...
44
45
46
 
47
48
49
50
0
@@ -9,7 +9,7 @@ require 'active_record/associations/has_and_belongs_to_many_association'
0
 require 'active_record/deprecated_associations'
0
 
0
 module ActiveRecord
0
- class HasManyThroughAssociationNotFoundError < ActiveRecordError
0
+ class HasManyThroughAssociationNotFoundError < ActiveRecordError #:nodoc:
0
     def initialize(reflection)
0
       @reflection = reflection
0
     end
0
@@ -19,7 +19,7 @@ module ActiveRecord
0
     end
0
   end
0
 
0
- class HasManyThroughAssociationPolymorphicError < ActiveRecordError
0
+ class HasManyThroughAssociationPolymorphicError < ActiveRecordError #:nodoc:
0
     def initialize(owner_class_name, reflection, source_reflection)
0
       @owner_class_name = owner_class_name
0
       @reflection = reflection
0
@@ -31,7 +31,7 @@ module ActiveRecord
0
     end
0
   end
0
 
0
- class HasManyThroughSourceAssociationNotFoundError < ActiveRecordError
0
+ class HasManyThroughSourceAssociationNotFoundError < ActiveRecordError #:nodoc:
0
     def initialize(reflection)
0
       @reflection = reflection
0
       @through_reflection = reflection.through_reflection
0
@@ -44,7 +44,7 @@ module ActiveRecord
0
     end
0
   end
0
 
0
- class EagerLoadPolymorphicError < ActiveRecordError
0
+ class EagerLoadPolymorphicError < ActiveRecordError #:nodoc:
0
     def initialize(reflection)
0
       @reflection = reflection
0
     end
...
253
254
255
256
 
257
258
259
...
561
562
563
564
 
565
566
567
...
573
574
575
576
 
577
578
579
...
592
593
594
595
 
596
597
598
599
 
600
601
602
...
704
705
706
 
707
708
709
...
717
718
719
720
 
721
722
723
...
729
730
731
732
 
733
734
735
...
1190
1191
1192
1193
 
1194
1195
1196
1197
1198
1199
 
1200
1201
1202
1203
1204
1205
1206
 
1207
1208
1209
...
1225
1226
1227
1228
 
1229
1230
1231
...
1254
1255
1256
1257
 
1258
1259
1260
...
1276
1277
1278
1279
 
1280
1281
1282
1283
1284
1285
 
1286
1287
1288
...
1293
1294
1295
1296
 
1297
1298
1299
...
1301
1302
1303
1304
 
1305
1306
1307
1308
1309
1310
 
1311
1312
1313
1314
1315
1316
1317
 
1318
1319
1320
1321
 
1322
1323
1324
...
1330
1331
1332
1333
 
1334
1335
1336
...
1604
1605
1606
 
1607
1608
1609
1610
1611
 
1612
1613
1614
...
253
254
255
 
256
257
258
259
...
561
562
563
 
564
565
566
567
...
573
574
575
 
576
577
578
579
...
592
593
594
 
595
596
597
598
 
599
600
601
602
...
704
705
706
707
708
709
710
...
718
719
720
 
721
722
723
724
...
730
731
732
 
733
734
735
736
...
1191
1192
1193
 
1194
1195
1196
1197
1198
1199
 
1200
1201
1202
1203
1204
1205
1206
 
1207
1208
1209
1210
...
1226
1227
1228
 
1229
1230
1231
1232
...
1255
1256
1257
 
1258
1259
1260
1261
...
1277
1278
1279
 
1280
1281
1282
1283
1284
1285
 
1286
1287
1288
1289
...
1294
1295
1296
 
1297
1298
1299
1300
...
1302
1303
1304
 
1305
1306
1307
1308
1309
1310
 
1311
1312
1313
1314
1315
1316
1317
 
1318
1319
1320
1321
 
1322
1323
1324
1325
...
1331
1332
1333
 
1334
1335
1336
1337
...
1605
1606
1607
1608
1609
1610
1611
1612
 
1613
1614
1615
1616
0
@@ -253,7 +253,7 @@ module ActiveRecord #:nodoc:
0
       super
0
     end
0
     
0
- def self.reset_subclasses
0
+ def self.reset_subclasses #:nodoc:
0
       nonreloadables = []
0
       subclasses.each do |klass|
0
         unless klass.reloadable?
0
@@ -561,7 +561,7 @@ module ActiveRecord #:nodoc:
0
         reset_table_name
0
       end
0
 
0
- def reset_table_name
0
+ def reset_table_name #:nodoc:
0
         name = "#{table_name_prefix}#{undecorated_table_name(base_class.name)}#{table_name_suffix}"
0
         set_table_name(name)
0
         name
0
@@ -573,7 +573,7 @@ module ActiveRecord #:nodoc:
0
         reset_primary_key
0
       end
0
 
0
- def reset_primary_key
0
+ def reset_primary_key #:nodoc:
0
         key = 'id'
0
         case primary_key_prefix_type
0
           when :table_name
0
@@ -592,11 +592,11 @@ module ActiveRecord #:nodoc:
0
 
0
       # Lazy-set the sequence name to the connection's default. This method
0
       # is only ever called once since set_sequence_name overrides it.
0
- def sequence_name
0
+ def sequence_name #:nodoc:
0
         reset_sequence_name
0
       end
0
 
0
- def reset_sequence_name
0
+ def reset_sequence_name #:nodoc:
0
         default = connection.default_sequence_name(table_name, primary_key)
0
         set_sequence_name(default)
0
         default
0
@@ -704,6 +704,7 @@ module ActiveRecord #:nodoc:
0
         @columns_hash ||= columns.inject({}) { |hash, column| hash[column.name] = column; hash }
0
       end
0
 
0
+ # Returns an array of column names as strings.
0
       def column_names
0
         @column_names ||= columns.map { |column| column.name }
0
       end
0
@@ -717,7 +718,7 @@ module ActiveRecord #:nodoc:
0
       # Returns a hash of all the methods added to query each of the columns in the table with the name of the method as the key
0
       # and true as the value. This makes it possible to do O(1) lookups in respond_to? to check if a given method for attribute
0
       # is available.
0
- def column_methods_hash
0
+ def column_methods_hash #:nodoc:
0
         @dynamic_methods_hash ||= column_names.inject(Hash.new(false)) do |methods, attr|
0
           attr_name = attr.to_s
0
           methods[attr.to_sym] = attr_name
0
@@ -729,7 +730,7 @@ module ActiveRecord #:nodoc:
0
       end
0
 
0
       # Contains the names of the generated reader methods.
0
- def read_methods
0
+ def read_methods #:nodoc:
0
         @read_methods ||= Set.new
0
       end
0
 
0
@@ -1190,20 +1191,20 @@ module ActiveRecord #:nodoc:
0
         end
0
 
0
       protected
0
- def subclasses
0
+ def subclasses #:nodoc:
0
           @@subclasses[self] ||= []
0
           @@subclasses[self] + extra = @@subclasses[self].inject([]) {|list, subclass| list + subclass.subclasses }
0
         end
0
 
0
         # Test whether the given method and optional key are scoped.
0
- def scoped?(method, key = nil)
0
+ def scoped?(method, key = nil) #:nodoc:
0
           if current_scoped_methods && (scope = current_scoped_methods[method])
0
             !key || scope.has_key?(key)
0
           end
0
         end
0
 
0
         # Retrieve the scope for the given method and optional key.
0
- def scope(method, key = nil)
0
+ def scope(method, key = nil) #:nodoc:
0
           if current_scoped_methods && (scope = current_scoped_methods[method])
0
             key ? scope[key] : scope
0
           end
0
@@ -1225,7 +1226,7 @@ module ActiveRecord #:nodoc:
0
           alias_method :scoped_methods, :single_threaded_scoped_methods
0
         end
0
         
0
- def current_scoped_methods
0
+ def current_scoped_methods #:nodoc:
0
           scoped_methods.last
0
         end
0
 
0
@@ -1254,7 +1255,7 @@ module ActiveRecord #:nodoc:
0
         end
0
 
0
         # Returns the name of the class descending directly from ActiveRecord in the inheritance hierarchy.
0
- def class_name_of_active_record_descendant(klass)
0
+ def class_name_of_active_record_descendant(klass) #:nodoc:
0
           klass.base_class.name
0
         end
0
 
0
@@ -1276,13 +1277,13 @@ module ActiveRecord #:nodoc:
0
 
0
         alias_method :sanitize_conditions, :sanitize_sql
0
 
0
- def replace_bind_variables(statement, values)
0
+ def replace_bind_variables(statement, values) #:nodoc:
0
           raise_if_bind_arity_mismatch(statement, statement.count('?'), values.size)
0
           bound = values.dup
0
           statement.gsub('?') { quote_bound_value(bound.shift) }
0
         end
0
 
0
- def replace_named_bind_variables(statement, bind_vars)
0
+ def replace_named_bind_variables(statement, bind_vars) #:nodoc:
0
           statement.gsub(/:(\w+)/) do
0
             match = $1.to_sym
0
             if bind_vars.include?(match)
0
@@ -1293,7 +1294,7 @@ module ActiveRecord #:nodoc:
0
           end
0
         end
0
 
0
- def quote_bound_value(value)
0
+ def quote_bound_value(value) #:nodoc:
0
           if (value.respond_to?(:map) && !value.is_a?(String))
0
             value.map { |v| connection.quote(v) }.join(',')
0
           else
0
@@ -1301,24 +1302,24 @@ module ActiveRecord #:nodoc:
0
           end
0
         end
0
 
0
- def raise_if_bind_arity_mismatch(statement, expected, provided)
0
+ def raise_if_bind_arity_mismatch(statement, expected, provided) #:nodoc:
0
           unless expected == provided
0
             raise PreparedStatementInvalid, "wrong number of bind variables (#{provided} for #{expected}) in: #{statement}"
0
           end
0
         end
0
 
0
- def extract_options_from_args!(args)
0
+ def extract_options_from_args!(args) #:nodoc:
0
           args.last.is_a?(Hash) ? args.pop : {}
0
         end
0
 
0
         VALID_FIND_OPTIONS = [ :conditions, :include, :joins, :limit, :offset,
0
                                :order, :select, :readonly, :group, :from ]
0
         
0
- def validate_find_options(options)
0
+ def validate_find_options(options) #:nodoc:
0
           options.assert_valid_keys(VALID_FIND_OPTIONS)
0
         end
0
         
0
- def set_readonly_option!(options)
0
+ def set_readonly_option!(options) #:nodoc:
0
           # Inherit :readonly from finder scope if set. Otherwise,
0
           # if :joins is not blank then :readonly defaults to true.
0
           unless options.has_key?(:readonly)
0
@@ -1330,7 +1331,7 @@ module ActiveRecord #:nodoc:
0
           end
0
         end
0
 
0
- def encode_quoted_value(value)
0
+ def encode_quoted_value(value) #:nodoc:
0
           quoted_value = connection.quote(value)
0
           quoted_value = "'#{quoted_value[1..-2].gsub(/\'/, "\\\\'")}'" if quoted_value.include?("\\\'") # (for ruby mode) "
0
           quoted_value
0
@@ -1604,11 +1605,12 @@ module ActiveRecord #:nodoc:
0
         @attributes.frozen?
0
       end
0
 
0
+ # Records loaded through joins with piggy-back attributes will be marked as read only as they cannot be saved and return true to this query.
0
       def readonly?
0
         @readonly == true
0
       end
0
 
0
- def readonly!
0
+ def readonly! #:nodoc:
0
         @readonly = true
0
       end
0
 
...
1
2
 
3
4
5
...
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
 
 
 
 
 
 
 
 
 
 
 
 
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
 
 
 
178
179
180
181
182
183
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
184
185
186
187
188
189
190
191
192
 
 
 
 
 
 
193
194
195
196
197
198
 
 
 
199
200
201
202
203
204
205
206
207
208
 
 
 
 
 
 
 
 
 
209
210
211
212
213
 
 
 
 
214
215
216
217
218
219
220
 
 
 
 
 
 
 
221
222
223
224
225
...
1
 
2
3
4
5
...
143
144
145
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
146
147
148
149
150
151
152
153
154
155
156
157
158
 
 
 
 
 
 
 
 
 
 
 
 
 
 
159
160
161
162
163
 
 
 
 
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
 
186
187
 
 
 
 
 
188
189
190
191
192
193
194
 
195
 
 
 
196
197
198
199
 
 
 
 
 
 
 
 
 
200
201
202
203
204
205
206
207
208
209
 
 
 
 
210
211
212
213
214
 
 
 
 
 
 
215
216
217
218
219
220
221
222
 
223
224
225
0
@@ -1,5 +1,5 @@
0
 module ActiveRecord
0
- module Calculations
0
+ module Calculations #:nodoc:
0
     CALCULATIONS_OPTIONS = [:conditions, :joins, :order, :select, :group, :having, :distinct]
0
     def self.included(base)
0
       base.extend(ClassMethods)
0
@@ -143,83 +143,83 @@ module ActiveRecord
0
       end
0
 
0
       protected
0
- def construct_calculation_sql(aggregate, aggregate_alias, options)
0
- scope = scope(:find)
0
- sql = ["SELECT #{aggregate} AS #{aggregate_alias}"]
0
- sql << ", #{options[:group_field]} AS #{options[:group_alias]}" if options[:group]
0
- sql << " FROM #{table_name} "
0
- add_joins!(sql, options, scope)
0
- add_conditions!(sql, options[:conditions], scope)
0
- sql << " GROUP BY #{options[:group_field]}" if options[:group]
0
- sql << " HAVING #{options[:having]}" if options[:group] && options[:having]
0
- sql << " ORDER BY #{options[:order]}" if options[:order]
0
- sql.join
0
- end
0
-
0
- def execute_simple_calculation(operation, column_name, column, aggregate, aggregate_alias, options)
0
- value = connection.select_value(construct_calculation_sql(aggregate, aggregate_alias, options))
0
- type_cast_calculated_value(value, column, operation)
0
- end
0
+ def construct_calculation_sql(aggregate, aggregate_alias, options) #:nodoc:
0
+ scope = scope(:find)
0
+ sql = ["SELECT #{aggregate} AS #{aggregate_alias}"]
0
+ sql << ", #{options[:group_field]} AS #{options[:group_alias]}" if options[:group]
0
+ sql << " FROM #{table_name} "
0
+ add_joins!(sql, options, scope)
0
+ add_conditions!(sql, options[:conditions], scope)
0
+ sql << " GROUP BY #{options[:group_field]}" if options[:group]
0
+ sql << " HAVING #{options[:having]}" if options[:group] && options[:having]
0
+ sql << " ORDER BY #{options[:order]}" if options[:order]
0
+ sql.join
0
+ end
0
 
0
- def execute_grouped_calculation(operation, column_name, column, aggregate, aggregate_alias, options)
0
- group_attr = options[:group].to_s
0
- association = reflect_on_association(group_attr.to_sym)
0
- associated = association && association.macro == :belongs_to # only count belongs_to associations
0
- group_field = (associated ? "#{options[:group]}_id" : options[:group]).to_s
0
- group_alias = column_alias_for(group_field)
0
- group_column = column_for group_field
0
- sql = construct_calculation_sql(aggregate, aggregate_alias, options.merge(:group_field => group_field, :group_alias => group_alias))
0
- calculated_data = connection.select_all(sql)
0
-
0
- if association
0
- key_ids = calculated_data.collect { |row| row[group_alias] }
0
- key_records = association.klass.base_class.find(key_ids)
0
- key_records = key_records.inject({}) { |hsh, r| hsh.merge(r.id => r) }
0
+ def execute_simple_calculation(operation, column_name, column, aggregate, aggregate_alias, options) #:nodoc:
0
+ value = connection.select_value(construct_calculation_sql(aggregate, aggregate_alias, options))
0
+ type_cast_calculated_value(value, column, operation)
0
         end
0
 
0
- calculated_data.inject(OrderedHash.new) do |all, row|
0
- key = associated ? key_records[row[group_alias].to_i] : type_cast_calculated_value(row[group_alias], group_column)
0
- value = row[aggregate_alias]
0
- all << [key, type_cast_calculated_value(value, column, operation)]
0
+ def execute_grouped_calculation(operation, column_name, column, aggregate, aggregate_alias, options) #:nodoc:
0
+ group_attr = options[:group].to_s
0
+ association = reflect_on_association(group_attr.to_sym)
0
+ associated = association && association.macro == :belongs_to # only count belongs_to associations
0
+ group_field = (associated ? "#{options[:group]}_id" : options[:group]).to_s
0
+ group_alias = column_alias_for(group_field)
0
+ group_column = column_for group_field
0
+ sql = construct_calculation_sql(aggregate, aggregate_alias, options.merge(:group_field => group_field, :group_alias => group_alias))
0
+ calculated_data = connection.select_all(sql)
0
+
0
+ if association
0
+ key_ids = calculated_data.collect { |row| row[group_alias] }
0
+ key_records = association.klass.base_class.find(key_ids)
0
+ key_records = key_records.inject({}) { |hsh, r| hsh.merge(r.id => r) }
0
+ end
0
+
0
+ calculated_data.inject(OrderedHash.new) do |all, row|
0
+ key = associated ? key_records[row[group_alias].to_i] : type_cast_calculated_value(row[group_alias], group_column)
0
+ value = row[aggregate_alias]
0
+ all << [key, type_cast_calculated_value(value, column, operation)]
0
+ end
0
         end
0
- end
0
 
0
       private
0
- def validate_calculation_options(operation, options = {})
0
- if operation.to_s == 'count'
0
- options.assert_valid_keys(CALCULATIONS_OPTIONS + [:include])
0
- else
0
- options.assert_valid_keys(CALCULATIONS_OPTIONS)
0
+ def validate_calculation_options(operation, options = {})
0
+ if operation.to_s == 'count'
0
+ options.assert_valid_keys(CALCULATIONS_OPTIONS + [:include])
0
+ else
0
+ options.assert_valid_keys(CALCULATIONS_OPTIONS)
0
+ end
0
         end
0
- end
0
 
0
- def select_aggregate(operation, column_name, options)
0
- "#{operation}(#{'DISTINCT ' if options[:distinct]}#{column_name})"
0
- end
0
+ def select_aggregate(operation, column_name, options)
0
+ "#{operation}(#{'DISTINCT ' if options[:distinct]}#{column_name})"
0
+ end
0
 
0
- # converts a given key to the value that the database adapter returns as
0
- #
0
- # users.id #=> users_id
0
- # sum(id) #=> sum_id
0
- # count(distinct users.id) #=> count_distinct_users_id
0
- # count(*) #=> count_all
0
- def column_alias_for(*keys)
0
- keys.join(' ').downcase.gsub(/\*/, 'all').gsub(/\W+/, ' ').strip.gsub(/ +/, '_')
0
- end
0
+ # converts a given key to the value that the database adapter returns as
0
+ #
0
+ # users.id #=> users_id
0
+ # sum(id) #=> sum_id
0
+ # count(distinct users.id) #=> count_distinct_users_id
0
+ # count(*) #=> count_all
0
+ def column_alias_for(*keys)
0
+ keys.join(' ').downcase.gsub(/\*/, 'all').gsub(/\W+/, ' ').strip.gsub(/ +/, '_')
0
+ end
0
 
0
- def column_for(field)
0
- field_name = field.to_s.split('.').last
0
- columns.detect { |c| c.name.to_s == field_name }
0
- end
0
+ def column_for(field)
0
+ field_name = field.to_s.split('.').last
0
+ columns.detect { |c| c.name.to_s == field_name }
0
+ end
0
 
0
- def type_cast_calculated_value(value, column, operation = nil)
0
- operation = operation.to_s.downcase
0
- case operation
0
- when 'count' then value.to_i
0
- when 'avg' then value.to_f
0
- else column ? column.type_cast(value) : value
0
+ def type_cast_calculated_value(value, column, operation = nil)
0
+ operation = operation.to_s.downcase
0
+ case operation
0
+ when 'count' then value.to_i
0
+ when 'avg' then value.to_f
0
+ else column ? column.type_cast(value) : value
0
+ end
0
         end
0
- end
0
     end
0
   end
0
 end
...
38
39
40
41
 
42
43
44
...
51
52
53
54
 
55
56
57
...
62
63
64
65
 
66
67
68
...
88
89
90
91
 
92
93
94
...
244
245
246
247
 
248
249
250
...
257
258
259
260
 
261
262
263
...
38
39
40
 
41
42
43
44
...
51
52
53
 
54
55
56
57
...
62
63
64
 
65
66
67
68
...
88
89
90
 
91
92
93
94
...
244
245
246
 
247
248
249
250
...
257
258
259
 
260
261
262
263
0
@@ -38,7 +38,7 @@ module ActiveRecord
0
       end
0
      
0
       # set concurrency support flag (not thread safe, like most of the methods in this file)
0
- def allow_concurrency=(threaded)
0
+ def allow_concurrency=(threaded) #:nodoc:
0
         logger.debug "allow_concurrency=#{threaded}" if logger
0
         return if @@allow_concurrency == threaded
0
         clear_all_cached_connections!
0
@@ -51,7 +51,7 @@ module ActiveRecord
0
         log_connections if logger
0
       end
0
       
0
- def active_connection_name
0
+ def active_connection_name #:nodoc:
0
         @active_connection_name ||=
0
            if active_connections[name] || @@defined_connections[name]
0
              name
0
@@ -62,7 +62,7 @@ module ActiveRecord
0
            end
0
       end
0
 
0
- def clear_active_connection_name
0
+ def clear_active_connection_name #:nodoc:
0
         @active_connection_name = nil
0
         subclasses.each { |klass| klass.clear_active_connection_name }
0
       end
0
@@ -88,7 +88,7 @@ module ActiveRecord
0
       end
0
 
0
       # Verify active connections.
0
- def verify_active_connections!
0
+ def verify_active_connections! #:nodoc:
0
         if @@allow_concurrency
0
           remove_stale_cached_threads!(@@active_connections) do |name, conn|
0
             conn.disconnect!
0
@@ -244,7 +244,7 @@ module ActiveRecord
0
     end
0
 
0
     # Set the connection for the class.
0
- def self.connection=(spec)
0
+ def self.connection=(spec) #:nodoc:
0
       if spec.kind_of?(ActiveRecord::ConnectionAdapters::AbstractAdapter)
0
         active_connections[name] = spec
0
       elsif spec.kind_of?(ConnectionSpecification)
0
@@ -257,7 +257,7 @@ module ActiveRecord
0
     end
0
 
0
     # connection state logging
0
- def self.log_connections
0
+ def self.log_connections #:nodoc:
0
       if logger
0
         logger.info "Defined connections: #{@@defined_connections.inspect}"
0
         logger.info "Active connections: #{active_connections.inspect}"
...
44
45
46
47
 
 
 
 
 
48
49
50
...
542
543
544
545
 
546
547
548
...
44
45
46
 
47
48
49
50
51
52
53
54
...
546
547
548
 
549
550
551
552
0
@@ -44,7 +44,11 @@ begin
0
       # Enable the id column to be bound into the sql later, by the adapter's insert method.
0
       # This is preferable to inserting the hard-coded value here, because the insert method
0
       # needs to know the id value explicitly.
0
- alias :attributes_with_quotes_pre_oracle :attributes_with_quotes #:nodoc:
0
+ def attributes_with_quotes_pre_oracle #:nodoc:
0
+ attributes_with_quotes
0
+ end
0
+
0
+
0
       def attributes_with_quotes(creating = true) #:nodoc:
0
         aq = attributes_with_quotes_pre_oracle creating
0
         if connection.class == ConnectionAdapters::OracleAdapter
0
@@ -542,7 +546,7 @@ begin
0
       @desc.attrGet(OCI_ATTR_PARAM)
0
     end
0
 
0
- class OraObject
0
+ class OraObject #:nodoc:
0
       attr_reader :schema, :name
0
       def initialize(info)
0
         case info.attrGet(OCI_ATTR_PTYPE)
...
60
61
62
63
 
64
65
66
67
 
68
69
70
71
 
72
73
74
...
60
61
62
 
63
64
65
66
 
67
68
69
70
 
71
72
73
74
0
@@ -60,15 +60,15 @@ module ActiveRecord
0
     end
0
     
0
     class << self
0
- def set_locking_column( value=nil, &block )
0
+ def set_locking_column(value = nil, &block)
0
         define_attr_method :locking_column, value, &block
0
       end
0
   
0
- def locking_column
0
+ def locking_column #:nodoc:
0
         reset_locking_column
0
       end
0
   
0
- def reset_locking_column
0
+ def reset_locking_column #:nodoc:
0
         default = 'lock_version'
0
         set_locking_column(default)
0
         default
...
6
7
8
9
 
10
11
12
...
6
7
8
 
9
10
11
12
0
@@ -6,7 +6,7 @@ module ActiveRecord
0
   # rescue ActiveRecord::RecordInvalid => invalid
0
   # puts invalid.record.errors
0
   # end
0
- class RecordInvalid < ActiveRecordError
0
+ class RecordInvalid < ActiveRecordError #:nodoc:
0
     attr_reader :record
0
     def initialize(record)
0
       @record = record

Comments

    No one has commented yet.