aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/migration/join_table.rb
Commit message (Collapse)AuthorAgeFilesLines
* Enable `Layout/EmptyLinesAroundAccessModifier` copRyuta Kamizono2019-06-131-1/+0
| | | | | | | | | | | We sometimes say "✂️ newline after `private`" in a code review (e.g. https://github.com/rails/rails/pull/18546#discussion_r23188776, https://github.com/rails/rails/pull/34832#discussion_r244847195). Now `Layout/EmptyLinesAroundAccessModifier` cop have new enforced style `EnforcedStyle: only_before` (https://github.com/rubocop-hq/rubocop/pull/7059). That cop and enforced style will reduce the our code review cost.
* Use frozen-string-literal in ActiveRecordKir Shatrov2017-07-191-0/+2
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* normalizes indentation and whitespace across the projectXavier Noria2016-08-061-6/+6
|
* create_join_table uses same logic as HABTM reflectionsStefan Kanev2014-07-181-1/+1
| | | | | | | | Before this change, create_join_table would not remove the common prefix in the join table name, unlike ActiveRecord::Reflections. A HABTM between Music::Artist and Music::Record would use a table music_artists_records, while create_join table would create music_artists_music_records.
* Coerce strings in create_join_table.Steve Klabnik2012-11-211-1/+1
| | | | | | | If you accidentally pass a string and a symbol, this breaks. So we coerce them both to strings. Fixes #7715
* Create default join table name using a SymbolCarlos Antonio da Silva2012-07-191-1/+1
| | | | | Lets stick with a symbol in join table name, it was removed in 993e1643650b7b0939437f86b7b4cda0d92b0b8f and broke the build.
* Add fkey attributes to `join_table` migration generatorAleksey Magusev2012-07-191-1/+1
|
* Add join table migration generatorAleksey Magusev2012-07-181-4/+2
| | | | | | | | | | | | | For instance, running rails g migration CreateMediaJoinTable artists musics:uniq will create a migration with create_join_table :artists, :musics do |t| # t.index [:artist_id, :music_id] t.index [:music_id, :artist_id], unique: true end
* Add `create_join_table` migration helper to create HABTM join tablesRafael Mendonça França2012-01-271-0/+17