fancy-crowd-87619
05/12/2023, 10:16 PMdefault
value of the action fields use the values from the NonprofitRequest model. Like this:
ruby
class AcceptNonprofitRequest < Avo::BaseAction
field :name, as: :text, default: ->(model) { model.name }
end
As far as I can tell the above is not possible. Anyone have any other ideas on how I can enable this behavior on an action? Maybe I need to use something besides actions for this?lemon-wall-20836
05/13/2023, 4:52 PMlemon-wall-20836
05/13/2023, 4:52 PMlemon-wall-20836
05/13/2023, 4:52 PMlemon-wall-20836
05/13/2023, 4:53 PMlemon-wall-20836
05/13/2023, 4:53 PMlemon-wall-20836
05/13/2023, 4:53 PMfancy-crowd-87619
05/16/2023, 3:07 PMnew
then, reading the docs there - Now I'm just trying
ruby
field :foo, as: :text, required: true, default: -> { 'bar' }
and I'm getting:fancy-crowd-87619
05/16/2023, 3:08 PMfancy-crowd-87619
05/16/2023, 3:09 PMshow
viewlemon-wall-20836
05/17/2023, 9:36 AMlemon-wall-20836
05/17/2023, 9:37 AMfancy-crowd-87619
05/17/2023, 4:13 PMlemon-wall-20836
05/17/2023, 4:33 PMlemon-wall-20836
05/17/2023, 4:33 PMlemon-wall-20836
05/17/2023, 4:35 PM