シンプルなすべてのものを表示するビューを設定するときに、Trailblazer で問題が発生しました。
手術
class Thing < ApplicationRecord
class ShowAll < Trailblazer::Operation
include Model
model Thing, :all #why :all is not working here?
def process
end
end
end
コントローラ
class PageController < ApplicationController
def index
run Word::ShowAll
end
end
:all
データベースからすべてのものを:find
取得するために機能しないのに、ID を介して 1 つを取得するために機能するのはなぜですか?