Skip to content

Commit b3f4ed5

Browse files
committed
Add ! aliases to methods for in memory model for Rails generated templates
1 parent 3d3b9f5 commit b3f4ed5

File tree

1 file changed

+2
-0
lines changed
  • example_app_generator/no_active_record/app/models/in_memory

1 file changed

+2
-0
lines changed

example_app_generator/no_active_record/app/models/in_memory/model.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,13 @@ def save(*)
7272
self.class.all << self
7373
true
7474
end
75+
alias :save! :save
7576

7677
def destroy
7778
self.class.all.delete(self)
7879
true
7980
end
81+
alias :destroy! :destroy
8082

8183
def reload(*)
8284
self

0 commit comments

Comments
 (0)