ファイルに次link_to
のコード行があります。html.erb
<%= link_to "no thanks" %>
このリンクをクリックして:reject
、この「treating.rb」モデル ファイルで設定したステート メソッドをトリガーします。
class Treating < ActiveRecord::Base
attr_accessible :intro, :proposed_date, :proposed_location, :requestee_id, :state
state_machine :state, :initial => :pending do
event :reject do
transition [:pending] => :rejected
end
event :reply do
transition [:pending, :rejected] => :replied
end
event :archive do
transition [:rejected] => :archived
end
end
...
end
link_to
ステータスが「保留」から「拒否」に変更されることを参照している「処理中」を取得するには、コード行に何を入力すればよいですか? 私は試してみましたがaction =>
、method =>
成功しませんでした。