Skip to content

Commit 6c5bbb4

Browse files
committed
No need to nodoc private methods
1 parent 4273ab3 commit 6c5bbb4

File tree

11 files changed

+31
-31
lines changed

11 files changed

+31
-31
lines changed

activerecord/lib/active_record/aggregations.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ def reload(*) # :nodoc:
1515

1616
private
1717

18-
def clear_aggregation_cache # :nodoc:
18+
def clear_aggregation_cache
1919
@aggregation_cache.clear if persisted?
2020
end
2121

22-
def init_internals # :nodoc:
22+
def init_internals
2323
@aggregation_cache = {}
2424
super
2525
end

activerecord/lib/active_record/associations.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,11 +260,11 @@ def reload(*) # :nodoc:
260260

261261
private
262262
# Clears out the association cache.
263-
def clear_association_cache # :nodoc:
263+
def clear_association_cache
264264
@association_cache.clear if persisted?
265265
end
266266

267-
def init_internals # :nodoc:
267+
def init_internals
268268
@association_cache = {}
269269
super
270270
end

activerecord/lib/active_record/attribute_assignment.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def attributes=(attributes)
1212

1313
private
1414

15-
def _assign_attributes(attributes) # :nodoc:
15+
def _assign_attributes(attributes)
1616
multi_parameter_attributes = {}
1717
nested_parameter_attributes = {}
1818

activerecord/lib/active_record/callbacks.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,15 +283,15 @@ def touch(*) #:nodoc:
283283

284284
private
285285

286-
def create_or_update(*) #:nodoc:
286+
def create_or_update(*)
287287
_run_save_callbacks { super }
288288
end
289289

290-
def _create_record #:nodoc:
290+
def _create_record
291291
_run_create_callbacks { super }
292292
end
293293

294-
def _update_record(*) #:nodoc:
294+
def _update_record(*)
295295
_run_update_callbacks { super }
296296
end
297297
end

activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,23 +1262,23 @@ def create_alter_table(name)
12621262
AlterTable.new create_table_definition(name)
12631263
end
12641264

1265-
def index_name_options(column_names) # :nodoc:
1265+
def index_name_options(column_names)
12661266
if column_names.is_a?(String)
12671267
column_names = column_names.scan(/\w+/).join("_")
12681268
end
12691269

12701270
{ column: column_names }
12711271
end
12721272

1273-
def foreign_key_name(table_name, options) # :nodoc:
1273+
def foreign_key_name(table_name, options)
12741274
identifier = "#{table_name}_#{options.fetch(:column)}_fk"
12751275
hashed_identifier = Digest::SHA256.hexdigest(identifier).first(10)
12761276
options.fetch(:name) do
12771277
"fk_rails_#{hashed_identifier}"
12781278
end
12791279
end
12801280

1281-
def validate_index_length!(table_name, new_name, internal = false) # :nodoc:
1281+
def validate_index_length!(table_name, new_name, internal = false)
12821282
max_index_length = internal ? index_name_length : allowed_index_name_length
12831283

12841284
if new_name.length > max_index_length

activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ def translate_exception(exception, message)
440440

441441
private
442442

443-
def get_oid_type(oid, fmod, column_name, sql_type = "") # :nodoc:
443+
def get_oid_type(oid, fmod, column_name, sql_type = "")
444444
if !type_map.key?(oid)
445445
load_additional_types(type_map, [oid])
446446
end
@@ -453,7 +453,7 @@ def get_oid_type(oid, fmod, column_name, sql_type = "") # :nodoc:
453453
}
454454
end
455455

456-
def initialize_type_map(m) # :nodoc:
456+
def initialize_type_map(m)
457457
register_class_with_limit m, "int2", Type::Integer
458458
register_class_with_limit m, "int4", Type::Integer
459459
register_class_with_limit m, "int8", Type::Integer
@@ -521,7 +521,7 @@ def initialize_type_map(m) # :nodoc:
521521
load_additional_types(m)
522522
end
523523

524-
def extract_limit(sql_type) # :nodoc:
524+
def extract_limit(sql_type)
525525
case sql_type
526526
when /^bigint/i, /^int8/i
527527
8
@@ -533,7 +533,7 @@ def extract_limit(sql_type) # :nodoc:
533533
end
534534

535535
# Extracts the value from a PostgreSQL column default definition.
536-
def extract_value_from_default(default) # :nodoc:
536+
def extract_value_from_default(default)
537537
case default
538538
# Quoted types
539539
when /\A[\(B]?'(.*)'.*::"?([\w. ]+)"?(?:\[\])?\z/m
@@ -559,15 +559,15 @@ def extract_value_from_default(default) # :nodoc:
559559
end
560560
end
561561

562-
def extract_default_function(default_value, default) # :nodoc:
562+
def extract_default_function(default_value, default)
563563
default if has_default_function?(default_value, default)
564564
end
565565

566-
def has_default_function?(default_value, default) # :nodoc:
566+
def has_default_function?(default_value, default)
567567
!default_value && (%r{\w+\(.*\)|\(.*\)::\w+} === default)
568568
end
569569

570-
def load_additional_types(type_map, oids = nil) # :nodoc:
570+
def load_additional_types(type_map, oids = nil)
571571
initializer = OID::TypeMapInitializer.new(type_map)
572572

573573
if supports_ranges?
@@ -735,7 +735,7 @@ def configure_connection
735735
end
736736

737737
# Returns the current ID of a table's sequence.
738-
def last_insert_id_result(sequence_name) # :nodoc:
738+
def last_insert_id_result(sequence_name)
739739
exec_query("SELECT currval('#{sequence_name}')", "SQL")
740740
end
741741

@@ -757,7 +757,7 @@ def last_insert_id_result(sequence_name) # :nodoc:
757757
# Query implementation notes:
758758
# - format_type includes the column size constraint, e.g. varchar(50)
759759
# - ::regclass is a function that gives the id for a table name
760-
def column_definitions(table_name) # :nodoc:
760+
def column_definitions(table_name)
761761
query(<<-end_sql, "SCHEMA")
762762
SELECT a.attname, format_type(a.atttypid, a.atttypmod),
763763
pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod,
@@ -772,12 +772,12 @@ def column_definitions(table_name) # :nodoc:
772772
end_sql
773773
end
774774

775-
def extract_table_ref_from_insert_sql(sql) # :nodoc:
775+
def extract_table_ref_from_insert_sql(sql)
776776
sql[/into\s("[A-Za-z0-9_."\[\]\s]+"|[A-Za-z0-9_."\[\]]+)\s*/im]
777777
$1.strip if $1
778778
end
779779

780-
def create_table_definition(*args) # :nodoc:
780+
def create_table_definition(*args)
781781
PostgreSQL::TableDefinition.new(*args)
782782
end
783783

activerecord/lib/active_record/core.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,14 +299,14 @@ def type_caster # :nodoc:
299299

300300
private
301301

302-
def cached_find_by_statement(key, &block) # :nodoc:
302+
def cached_find_by_statement(key, &block)
303303
cache = @find_by_statement_cache[connection.prepared_statements]
304304
cache[key] || cache.synchronize {
305305
cache[key] ||= StatementCache.create(connection, &block)
306306
}
307307
end
308308

309-
def relation # :nodoc:
309+
def relation
310310
relation = Relation.create(self, arel_table, predicate_builder)
311311

312312
if finder_needs_type_condition? && !ignore_default_scope?
@@ -316,7 +316,7 @@ def relation # :nodoc:
316316
end
317317
end
318318

319-
def table_metadata # :nodoc:
319+
def table_metadata
320320
TableMetadata.new(self, arel_table)
321321
end
322322
end

activerecord/lib/active_record/locking/optimistic.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def increment_lock
6969
send(lock_col + "=", previous_lock_value + 1)
7070
end
7171

72-
def _create_record(attribute_names = self.attribute_names, *) # :nodoc:
72+
def _create_record(attribute_names = self.attribute_names, *)
7373
if locking_enabled?
7474
# We always want to persist the locking version, even if we don't detect
7575
# a change from the default, since the database might have no default
@@ -78,7 +78,7 @@ def _create_record(attribute_names = self.attribute_names, *) # :nodoc:
7878
super
7979
end
8080

81-
def _update_record(attribute_names = self.attribute_names) #:nodoc:
81+
def _update_record(attribute_names = self.attribute_names)
8282
return super unless locking_enabled?
8383

8484
lock_col = self.class.locking_column

activerecord/lib/active_record/relation/spawn_methods.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def only(*onlies)
6666

6767
private
6868

69-
def relation_with(values) # :nodoc:
69+
def relation_with(values)
7070
result = Relation.create(klass, table, predicate_builder, values)
7171
result.extend(*extending_values) if extending_values.any?
7272
result

activerecord/lib/active_record/schema.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def define(info, &block) # :nodoc:
6161
#
6262
# ActiveRecord::Schema.new.migrations_paths
6363
# # => ["db/migrate"] # Rails migration path by default.
64-
def migrations_paths # :nodoc:
64+
def migrations_paths
6565
ActiveRecord::Migrator.migrations_paths
6666
end
6767
end

0 commit comments

Comments
 (0)