miniature-optician-85831
03/13/2024, 9:51 PMminiature-optician-85831
03/30/2024, 10:37 AMminiature-optician-85831
04/03/2024, 1:56 PMfuture-garden-51299
04/05/2024, 7:57 PMminiature-optician-85831
04/23/2024, 8:27 AMminiature-optician-85831
04/27/2024, 10:02 PMquiet-magazine-86193
05/01/2024, 5:08 PMindex_controls
? It is a bad UX to the action needed to load and run, to then, display them a No records selected
error. Without mentioning they will need to write/select/whatever from the action-fields.quiet-magazine-86193
05/10/2024, 7:29 PMrow_controls
hidden, on different resources:
https://cdn.discordapp.com/attachments/1141725701549072486/1238573624714330204/image.png?ex=663fc713&is=663e7593&hm=3b30d863226d22765496122a0836273f1a598dc56f9291bdd0884e5e7365af5f&
https://cdn.discordapp.com/attachments/1141725701549072486/1238573625020383305/image.png?ex=663fc713&is=663e7593&hm=1c3d108e9a7f2382242fecee7897200f9b756a1c438a1514b9ebe214216006a6&purple-park-97233
05/12/2024, 12:31 PMRails.configuration.to_prepare do
Avo::Fields::BaseField.include FieldExtensions
end
Exiting
13:30:45 web.1 | /Users/neiltonge/Developer/neiltongesite/config/initializers/avo.rb:171:in `<module:FieldExtensions>': uninitialized constant FieldExtensions::AttractionHelper (NameError)
13:30:45 web.1 |
13:30:45 web.1 | include AttractionHelper
13:30:45 web.1 | ^^^^^^^^^^^^^^^^
13:30:45 web.1 | from /Users/neiltonge/Developer/neiltongesite/config/initializers/avo.rb:169:in `<main>'
miniature-optician-85831
05/13/2024, 7:21 AMpurple-park-97233
05/15/2024, 6:33 AMagreeable-jelly-60158
06/06/2024, 5:07 PMpurple-park-97233
06/22/2024, 11:33 AMproud-breakfast-80041
07/04/2024, 11:48 AMproud-breakfast-80041
07/04/2024, 2:40 PMproud-breakfast-80041
07/09/2024, 9:18 AMvia_relation=events
when i click save player is saved, however there is an error in redirection in this method
def after_create_path
# If this is an associated record return to the association show page
if is_associated_record?
parent_resource = if params[:via_resource_class].present?
Avo.resource_manager.get_resource(params[:via_resource_class])
else
Avo.resource_manager.get_resource_by_model_class(params[:via_relation_class])
end
association_name = BaseResource.valid_association_name(@record, params[:via_relation])
return resource_view_path(
record: @record.send(association_name),
resource: parent_resource,
resource_id: params[:via_record_id]
)
end
as association_name
returns nil , because` params[:via_relation]`
is events but the association to the player is actually eventnarrow-laptop-54609
07/11/2024, 8:21 PMfuture-garden-51299
07/18/2024, 6:02 PMmammoth-guitar-49791
07/27/2024, 11:38 AMpurple-park-97233
08/01/2024, 7:12 PMfriendly_id
and have set the index query to:
self.find_record_method = -> {
if id.is_a?(Array)
query.where(slug: id)
else
query.friendly.find id
end
}
This too works great. Each record has it's slug and in my app, the slug of an Attraction contains the name and another attribute of the Venue it is associated with. I have it all configured so that if the name
or location_1
values of the Venue get changed, then the slugs of the Attractions get updated too. I know slugs don't typically change but it is very useful in my case.
If I make a change to a Venue that causes a new slug to be generated and I came from a standard Resource Index view (eg: http://localhost:3000/avo/resources/venues/drayton-manor-drayton-bassett) and edit it, it's fine, but if I get to the edit page and I have a URL like (http://localhost:3000/avo/resources/venues/drayton-manor-drayton-bassett?via_record_id=accelerator-drayton-manor-drayton-bassett&via_resource_class=Avo%3A%3AResources%3A%3AAttraction)
When it tries to go back to the page in the via_record_id
query param, it fails, because the slug is no different and the record can't be found.
It all makes sense and I understand why it's occuring.
My question is, what do you think? Are there any options to overcome this? Can you think of other ways to deal with this?
I am considering adding a new field altogether which sort of replicates the nromal slug
field but always stays in sync with the name, venue and location_1 values and just let the regular slug
column act like that and once set, never change. Would that make more sense?purple-park-97233
08/05/2024, 5:32 PMboundless-printer-62821
08/09/2024, 3:36 PMdefault_sort_column
, but is it also possible to change the default sort order to asc (it defaults to descending otherwise)?narrow-electrician-89982
09/11/2024, 6:59 PMrecord_selector = false
should be set by default instead of true, since there's no need to show the select field unless you have an action that does something to the selected records; which in 99% of the cases, no one hasbillowy-airline-65932
09/20/2024, 6:00 PMfield
that you need to display on the Index view? For example: I have a field as badge
, but my filter for this field needs to be as :select. Any ideas on how I could have this config?billowy-airline-65932
10/03/2024, 7:04 PMstraight-pager-31449
10/12/2024, 5:23 AMclass Avo::Cards::SumTotalNumber < Avo::Cards::PartialCard
self.partial = 'avo/cards/sum_total_number'
def query
self.id = arguments[:id]
...
end
end
def cards
card Avo::Cards::SumTotalNumber, cols: 1, rows: 2,
arguments: { id: :foobar, foo_data:, bar_statistics:...
...
helpful-waitress-4127
02/12/2025, 6:41 PMminiature-optician-85831
03/23/2025, 1:29 PMpurple-park-97233
03/23/2025, 1:37 PMhas_many :companyables, as: :companyable
has_many :companies, -> { distinct }, through: :companyables
Company:
has_many :companyables
has_many :attractions, through: :companyables, source: :companyable, source_type: 'Attraction'
has_many :roles, -> { distinct }, through: :companyables
Companyable:
belongs_to :company
belongs_to :companyable, polymorphic: true
belongs_to :role, optional: true
belongs_to :model, optional: true
belongs_to :submodel, optional: true
This works fine and on my Attraction resource I have:
tab "Companies" do
field :companyables, as: :has_many
end
This works fine and allows me to add new companyables via the UI where I can select the Role, the Model, and the SubModel for it. This all makes sense to me, but looking at it from a User perspective, they have no idea what a "Companyable" is, it's a made up word that means absolutely nothing to them.
To them they "want to add a Company to an Attraction", but technically what they need to do is "Add a Companyable to an Attraction" as the Companyable holds all the info about the role and the model/submodel.
Do I leave everything as it is and try to explain to Users what it means or can you recommend changes that may make it more user friendly and user understandable?
Changes could be as simple as altering wording. Could I change "Companyable" to "Company" just in the context of the UI? If I did that then the sidebar item for "Companyables" would be confusing.
It's tricky. Technically it all works beautifully and i'm very happy with it. Right now I ahve no plans to roll this out to other people so it is a non issue but it is something i've been thinking of how I could overcome it if I was to roll it out to others in the future.miniature-optician-85831
03/23/2025, 1:37 PM