Skip to content

Commit 5e40816

Browse files
committed
fix tableless with rails 8.x
1 parent dae1994 commit 5e40816

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/active_scaffold/tableless.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,14 +133,14 @@ class << new_relation; include RelationExtension; end unless new_relation.is_a?(
133133
end
134134

135135
def find_one(id)
136-
@klass.find_one(id, self) || raise(ActiveRecord::RecordNotFound)
136+
model.find_one(id, self) || raise(ActiveRecord::RecordNotFound)
137137
end
138138

139139
def execute_simple_calculation(operation, column_name, distinct)
140-
@klass.execute_simple_calculation(self, operation, column_name, distinct)
140+
model.execute_simple_calculation(self, operation, column_name, distinct)
141141
end
142142

143-
delegate :implicit_order_column, to: :@klass
143+
delegate :implicit_order_column, to: :model
144144

145145
def exists?
146146
size.positive?
@@ -149,7 +149,7 @@ def exists?
149149
private
150150

151151
def exec_queries
152-
@records = @klass.find_all(self)
152+
@records = model.find_all(self)
153153
@loaded = true
154154
@records
155155
end

0 commit comments

Comments
 (0)