Skip to content

Commit 8e0a0ce

Browse files
committed
fix tableless with rails 8
1 parent 14f0023 commit 8e0a0ce

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ jobs:
100100
- ruby: '3.4'
101101
rails: '7.2'
102102
coverage: true
103-
- rails: '8.0'
104-
allow_failure: true
103+
# - rails: '8.0'
104+
# allow_failure: true
105105
timeout-minutes: 60
106106
env:
107107
JRUBY_OPTS: "--debug"

gemfiles/Gemfile.rails-8.0.x.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: ..
33
specs:
4-
active_scaffold (4.1.3)
4+
active_scaffold (4.1.4)
55
dartsass-sprockets (~> 3.2.0)
66
html_attrs (~> 1.1)
77
ice_nine (~> 0.11)

lib/active_scaffold/tableless.rb

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

125125
def find_one(id)
126-
@klass.find_one(id, self) || raise(ActiveRecord::RecordNotFound)
126+
model.find_one(id, self) || raise(ActiveRecord::RecordNotFound)
127127
end
128128

129129
def execute_simple_calculation(operation, column_name, distinct)
130-
@klass.execute_simple_calculation(self, operation, column_name, distinct)
130+
model.execute_simple_calculation(self, operation, column_name, distinct)
131131
end
132132

133-
delegate :implicit_order_column, to: :@klass
133+
delegate :implicit_order_column, to: :model
134134

135135
def exists?
136136
size.positive?
@@ -139,7 +139,7 @@ def exists?
139139
private
140140

141141
def exec_queries
142-
@records = @klass.find_all(self)
142+
@records = model.find_all(self)
143143
@loaded = true
144144
@records
145145
end

0 commit comments

Comments
 (0)