wide-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?lemon-wall-20836
05/12/2023, 1:57 PMwide-art-99889
05/12/2023, 1:57 PMwide-art-99889
05/12/2023, 1:58 PMwide-art-99889
05/12/2023, 2:07 PMrender
calllemon-wall-20836
05/12/2023, 2:24 PMwide-art-99889
05/12/2023, 2:33 PMlemon-wall-20836
05/12/2023, 2:36 PM.rb
and .erb
files duplicated on your endwide-art-99889
05/12/2023, 3:26 PMlemon-wall-20836
05/12/2023, 3:28 PMlemon-wall-20836
05/12/2023, 3:28 PMdef partail_path
method which we could take over or use to extend in Avowide-art-99889
05/12/2023, 6:36 PMwide-art-99889
05/12/2023, 9:00 PMmax-h-[500px]
class on the div that encloses the ResourceTableComponent, which matches the default height for the map that's set by mapkick.
2. Subclass Avo::Views::ResourceIndexComponent by creating my own component class and template, Avo::Views::ConfigurableResourceIndexComponent. On line 52, I call <%= render(map_component_class_name.constantize.new(...
to allow me to sub in my own ConstrainedResourceMapClass. In the ConfigurableResourceIndexComponent class I define the following method:
def map_component_class_name
if @resource.respond_to?(:map_component_class_name)
@resource.map_component_class_name
else
DEFAULT_MAP_COMPONENT_CLASS_NAME
end
3. In my resource class, I add the following method:
def map_component_class
'Avo::index::ConstrainedResourceMapComponent'
end
wide-art-99889
05/12/2023, 9:01 PMlemon-wall-20836
05/13/2023, 12:59 PMlemon-wall-20836
05/13/2023, 1:00 PMlemon-wall-20836
05/13/2023, 1:00 PM