adventurous-crayon-9274
05/10/2023, 6:26 PMearly-knife-34520
05/11/2023, 3:27 PMfield :records, as: :has_many
.
So, in TestResource :show
I can see index of records
.
I also have RecordResource with custom standalone action. If i'm calling this action from TestResource :show
, I can only get instance of RecordResource without any associations.
But I want to access model instance of TestResource. Is it possible?microscopic-dream-82397
05/12/2023, 11:18 AMwide-art-99889
05/12/2023, 1:57 PMbin/rails generate avo:eject
. I read the code and the rake task accepts a symbol for a specific list of templates, or a string for pretty much any template. I ejected a specific template, but when I make changes to that template I don't see them on my local rails app. Is there another step I need to take to get my ejected template to take precedence?rough-library-77794
05/12/2023, 4:50 PMrough-library-77794
05/12/2023, 4:56 PMgreen-london-56146
05/12/2023, 4:57 PMgreen-london-56146
05/12/2023, 4:58 PMhttps://avodemo.s3.amazonaws.com/hua0j3dw469ob0ogj8yyn8cf5g1s?response-content-disposition=attachment%3B%20filename%3D%22even-track.mp3%22%3B%20filename%2A%3DUTF-8%27%27even-track.mp3&response-content-type=audio%2Fmpeg&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAQ2I55O4GW5456AGH%2F20230512%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230512T165808Z&X-Amz-Expires=300&X-Amz-SignedHeaders=host&X-Amz-Signature=25efbd19823963181e9c7a13a0d7bbc409dcdc629d38a48c6e4ea64f28ca3b11
green-london-56146
05/12/2023, 4:58 PMgreen-london-56146
05/12/2023, 5:00 PMgreen-london-56146
05/12/2023, 5:02 PMrough-library-77794
05/12/2023, 5:04 PMrough-library-77794
05/12/2023, 5:04 PMrough-library-77794
05/12/2023, 6:04 PMconfig.active_storage.service_urls_expire_in = 1.hours or 10.hours
in config/environments/development.rb
file works well.
But after that time the content(audio) will not be available for the user in the Avo admin, why this issue is not happening with image content in Avo demo? π€green-london-56146
05/12/2023, 6:06 PMrough-library-77794
05/12/2023, 6:09 PMfancy-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?microscopic-dream-82397
05/15/2023, 11:20 AMbillowy-easter-81499
05/16/2023, 2:17 PMcurved-father-82134
05/17/2023, 3:31 PMlemon-wall-20836
05/17/2023, 3:34 PMrequired
option is just a cosmethic onelemon-wall-20836
05/17/2023, 3:34 PMlemon-wall-20836
05/17/2023, 3:34 PMbillowy-easter-81499
05/17/2023, 3:44 PMbillowy-easter-81499
05/17/2023, 3:45 PMcreamy-ghost-62907
05/21/2023, 10:06 PMredirect_to
in an action. Specifically, if I have an action like this:
class SomeAction < Avo::BaseAction
self.name = "Some Action"
self.visible = -> { view == :show }
def handle(**args)
models, = args.values_at(:models)
unless models&.length == 1
error("You must do the thing to exactly one thing at a time.")
return
end
model_id = models.first.id
target = view_context.resources_some_model_path(model_id)
redirect_to(main_app.something_path(target:, model_id:))
end
end
The redirect is happening behind the scenes (I.E. entirely within the context of the Ajax request), entirely within the context of the Ajax request.
something_path
is a route that doesn't render a view, but instead redirects the user to a different site. I'm wondering if this is a corner-case involving Turbo? It doesn't happen with a route generated by Avo...creamy-ghost-62907
05/21/2023, 10:07 PMwide-art-99889
05/23/2023, 4:36 PMlg:max-h-[500px]
to constrain the height of an element. This works fine in my local development environment, but when I deploy to a heroku app the height constraint is not applied (I can see the tailwind class in the markup). I have tried the following steps to get it to work:
1. I added ./app/components/**/*.rb
and ./app/components/**/*.html.erb
to the content
section of my tailwind.config.js
file.
2. I added a safelist
section to the same file with an entry for lg:max-h-[500px]
Neither of these steps appears to fix the problem. Do I also need to run bin/rails avo:build-assets
as part of my heroku deploy process to get this to work?curved-father-82134
05/23/2023, 4:46 PMcalm-gold-48525
05/23/2023, 10:16 PM