File tree Expand file tree Collapse file tree 2 files changed +8
-12
lines changed Expand file tree Collapse file tree 2 files changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -38,9 +38,8 @@ module Rails
38
38
# # good
39
39
# class Blog < ApplicationRecord
40
40
# has_many(:posts,
41
- # -> { order(published_at: :desc) },
42
- # inverse_of: :blog
43
- # )
41
+ # -> { order(published_at: :desc) },
42
+ # inverse_of: :blog)
44
43
# end
45
44
#
46
45
# class Post < ApplicationRecord
@@ -62,9 +61,8 @@ module Rails
62
61
# # When you don't want to use the inverse association.
63
62
# class Blog < ApplicationRecord
64
63
# has_many(:posts,
65
- # -> { order(published_at: :desc) },
66
- # inverse_of: false
67
- # )
64
+ # -> { order(published_at: :desc) },
65
+ # inverse_of: false)
68
66
# end
69
67
#
70
68
# @example
Original file line number Diff line number Diff line change 959
959
# good
960
960
class Blog < ApplicationRecord
961
961
has_many(:posts ,
962
- -> { order(published_at: :desc ) },
963
- inverse_of: :blog
964
- )
962
+ -> { order(published_at: :desc ) },
963
+ inverse_of: :blog )
965
964
end
966
965
967
966
class Post < ApplicationRecord
983
982
# When you don't want to use the inverse association.
984
983
class Blog < ApplicationRecord
985
984
has_many(:posts ,
986
- -> { order(published_at: :desc ) },
987
- inverse_of: false
988
- )
985
+ -> { order(published_at: :desc ) },
986
+ inverse_of: false )
989
987
end
990
988
```
991
989
``` ruby
You can’t perform that action at this time.
0 commit comments