Skip to content

Commit

Permalink
Remove usage of OpenStruct
Browse files Browse the repository at this point in the history
  • Loading branch information
fatkodima committed Nov 8, 2024
1 parent c88140d commit e189e26
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion spec/dummy_app/app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ def info_for_paper_trail
private

def modify_current_user
@current_user = OpenStruct.new(id: 153)
@current_user = User.new(id: 153)
end
end
4 changes: 4 additions & 0 deletions spec/dummy_app/app/models/user.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# frozen_string_literal: true

class User < ApplicationRecord
end
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,8 @@ def up
t.string :name
t.text :supplier
end

create_table :users, force: true
end

def down
Expand Down

0 comments on commit e189e26

Please sign in to comment.