Skip to content

Commit

Permalink
Update ORM generator for ActiveRecord changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jkowens committed Jan 12, 2023
1 parent dc493e3 commit 9facca5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions padrino-admin/lib/padrino-admin/generators/orm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ def save

def update_attributes(params=nil)
case orm
when :activerecord, :minirecord, :mongomapper, :mongoid, :couchrest, :dynamoid then "@#{name_singular}.update_attributes(#{params})"
when :datamapper, :ohm then "@#{name_singular}.update(#{params})"
when :mongomapper, :mongoid, :couchrest, :dynamoid then "@#{name_singular}.update_attributes(#{params})"
when :activerecord, :minirecord, :datamapper, :ohm then "@#{name_singular}.update(#{params})"
when :sequel then "@#{name_singular}.modified! && @#{name_singular}.update(#{params})"
else raise OrmError, "Adapter #{orm} is not yet supported!"
end
Expand Down

0 comments on commit 9facca5

Please sign in to comment.