Skip to content

Commit

Permalink
activerecord: Arel::Table.new takes table kwargs since v6.1 (#655)
Browse files Browse the repository at this point in the history
  • Loading branch information
tk0miya authored Sep 10, 2024
1 parent e9bc1bf commit 94b4a7a
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 6 deletions.
6 changes: 6 additions & 0 deletions gems/activerecord/6.0/activerecord-6.0.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,9 @@ module ActiveRecord
def initialize: (untyped model, untyped inserts, on_duplicate: untyped, ?unique_by: untyped?, ?returning: untyped?) -> untyped
end
end

module Arel
class Table
def initialize: (untyped name, ?type_caster: untyped? type_caster, ?as: untyped? as) -> untyped
end
end
2 changes: 0 additions & 2 deletions gems/activerecord/6.0/activerecord-generated.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -23508,8 +23508,6 @@ module Arel
# TableAlias and Table both have a #table_name which is the name of the underlying table
alias table_name name

def initialize: (untyped name, ?type_caster: untyped? type_caster, ?as: untyped? as) -> untyped

def alias: (?::String name) -> Nodes::TableAlias

def from: () -> SelectManager
Expand Down
6 changes: 6 additions & 0 deletions gems/activerecord/6.1/activerecord-6.1.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,9 @@ module ActiveRecord
def initialize: (untyped model, untyped inserts, on_duplicate: untyped, ?unique_by: untyped?, ?returning: untyped?) -> untyped
end
end

module Arel
class Table
def initialize: (untyped name, ?type_caster: untyped type_caster, ?as: untyped? as, ?klass: untyped?) -> void
end
end
8 changes: 7 additions & 1 deletion gems/activerecord/7.0/activerecord-7.0.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,17 @@ module ActiveRecord
@record_timestamps: bool

def initialize: (untyped model, untyped inserts, on_duplicate: untyped, ?unique_by: untyped?, ?returning: untyped?, ?record_timestamps: bool?) -> untyped

def record_timestamps?: () -> bool

def keys_including_timestamps: () -> Set[String]

def timestamps_for_create: () -> Hash[String, String]
end
end

module Arel
class Table
def initialize: (untyped name, ?type_caster: untyped type_caster, ?as: untyped? as, ?klass: untyped?) -> void
end
end
12 changes: 9 additions & 3 deletions gems/activerecord/7.1/activerecord-7.1.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ module ActiveRecord

class MismatchedForeignKey < StatementInvalid
def initialize: (?message: untyped?, ?sql: untyped?, ?binds: untyped?, ?table: untyped?,
?foreign_key: untyped?, ?target_table: untyped?, ?primary_key: untyped?,
?primary_key_column: untyped?, ?query_parser: untyped?,
?foreign_key: untyped?, ?target_table: untyped?, ?primary_key: untyped?,
?primary_key_column: untyped?, ?query_parser: untyped?,
?connection_pool: ConnectionAdapters::ConnectionPool?) -> void
end

Expand All @@ -110,11 +110,17 @@ module ActiveRecord
@record_timestamps: bool

def initialize: (untyped model, untyped inserts, on_duplicate: untyped, ?unique_by: untyped?, ?returning: untyped?, ?record_timestamps: bool?) -> untyped

def record_timestamps?: () -> bool

def keys_including_timestamps: () -> Set[String]

def timestamps_for_create: () -> Hash[String, String]
end
end

module Arel
class Table
def initialize: (untyped name, ?type_caster: untyped type_caster, ?as: untyped? as, ?klass: untyped?) -> void
end
end

0 comments on commit 94b4a7a

Please sign in to comment.