ripe-article-50191
03/06/2023, 10:48 AMnice-ambulance-76519
03/06/2023, 3:50 PMkind-jewelry-65180
03/07/2023, 11:26 AMModel.pluck(:name, :id)
inside the resource to generate the options for a select, and this is giving an error on docker build in production. How can i create this list without call the model inside the resource?kind-jewelry-65180
03/07/2023, 11:28 AMmelodic-toddler-97877
03/07/2023, 3:44 PM:belongs_to
field on a form that loads a list of users. To render the user's name in the dropdown, we have to include an associated table with their name. Is there a way to specify that I wan't that data to be included? I'm getting n+1s when the list of users attempts to load.ripe-article-50191
03/08/2023, 4:32 PMquiet-winter-98496
03/08/2023, 6:14 PMstraight-mechanic-78430
03/09/2023, 1:39 PMstraight-mechanic-78430
03/09/2023, 1:40 PMlemon-wall-20836
03/09/2023, 1:49 PMlemon-wall-20836
03/10/2023, 10:13 AMlemon-spoon-80671
03/10/2023, 12:17 PMbelongs_to :session
has_many :session_execution_attendances
has_many :farmers, through: :session_execution_attendances
and I would like to hide the "Create new farmer" button in the "session execution" show. In my "session_execution_policy.rb" I have tried this:
def create_session_farmers?
false
end
but without success.
Could it be that I am missing something because of the has_many through relation? Thanks.little-psychiatrist-30020
03/13/2023, 10:45 AMbelongs_to
relationship that has 60K+ records, how can I tell avo not to try and load all of them but only do a search?little-psychiatrist-30020
03/13/2023, 10:46 AMArtist Load (52.1ms) SELECT "artists".* FROM "artists"
little-psychiatrist-30020
03/13/2023, 10:46 AMripe-article-50191
03/14/2023, 9:23 AMafter_create_path
in AVO controller end in error "Render and/or redirect were called multiple times in this action"little-psychiatrist-30020
03/14/2023, 9:30 AMhas_many_attached :images
association, how could I go about showing a preview of the first one? Eg it doesn't work the same as a singular file. I tried using a computed field but it didn't like that.little-psychiatrist-30020
03/14/2023, 9:30 AMfield 'cover', as: :file, link_to_resource: true, only_on: :index do |model|
model.images.first
end
little-psychiatrist-30020
03/14/2023, 11:53 AMable-needle-51274
03/14/2023, 8:17 PMas: :has_many
where the foreign key is not the expected value?able-needle-51274
03/14/2023, 8:17 PMparticipant_id
instead of user_id
?bright-tomato-27372
03/15/2023, 9:22 PMbelongs_to
? I don't see an option for it in the docs. Example: I'm on the index page of `Comment`s and I show the belongs_to
association to a Post
. I want to remove the link to the Post
record because it is unnecessary and I want to simplify some UI interactions. Passing a link_to_resource: false
does not work since it is limited to only Id
, Text
, and Gravatar
.
any reason why we don't extend that to associations? or does anyone have a suggestion of a quick fix / patch for that?powerful-planet-46063
03/15/2023, 10:14 PMruby
field :item,
as: :belongs_to,
only_on: [:forms]
field :item,
as: :text,
hidden_on: [:forms] do |model, resource, view|
model.item.label_maybe
rescue StandardError
false
end
bright-tomato-27372
03/15/2023, 10:37 PMpowerful-planet-46063
03/16/2023, 12:21 AMlemon-wall-20836
03/16/2023, 10:22 AMlemon-wall-20836
03/16/2023, 10:22 AMkind-jewelry-65180
03/16/2023, 6:49 PMripe-article-50191
03/17/2023, 1:14 PMripe-article-50191
03/17/2023, 1:17 PM