Skip to content

Commit

Permalink
Better, hm?
Browse files Browse the repository at this point in the history
  • Loading branch information
kaspth committed May 14, 2024
1 parent 15d5b47 commit 1f5b2b7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion lib/generators/associated/associated_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def connect_associated_object
raise "Record class '#{record_klass}' does not exist" unless File.exist?(record_file)

inject_into_class record_file, record_klass do
indent "has_object :#{associated_object_path}\n\n"
optimize_indentation "has_object :#{associated_object_path}", 2
end
end

Expand Down
1 change: 0 additions & 1 deletion test/lib/generators/associated_generator_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ class Organization::Seats < ActiveRecord::AssociatedObject
assert_file "app/models/organization.rb", <<~RUBY
class Organization
has_object :seats
end
RUBY
end
Expand Down

0 comments on commit 1f5b2b7

Please sign in to comment.