Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I use two different simple_form.rb initializer files?
    primarykey
    data
    text
    <h1>Problem</h1> <p>This is a simple question, I've looked around spree forums, plataforma tec forums and SO with no success.</p> <p>We want to use two separate simple_form configurations, one for our main application and another for a spree engine store we have mounted on a specific url.</p> <h1>More detailed Explanation</h1> <p>Currently in we're developing an application using the spree engine. This means that the spree engine is mounted on a specific url and is activated by going to mysite.com/store, for example.</p> <p>Now, on the main app, we're using a different set of assets than those of the spree store. Our original simple_form.rb initializer was created specifically for these assets.</p> <p>Here's where it gets interesting.</p> <p>Within the spree engine, we're developing a new form using simple_form as well. It works fine, but it's using the simple_form.rb file of our main app, which uses the main app's css tags and markup.</p> <p>We need to modify the simple_form.rb file to actually use the spree template's css in order for things to display correctly.</p> <h1>Possible solutions?</h1> <p>Ideally we should have a simple_form.rb file for the spree engine and one for the main app, but I haven't figured out a straight forward way of doing this... </p> <p>My other idea was to have some sort of conditional in the simple_form.rb file for it to load one set of options when we're on the main app and another set of options when in the spree store... maybe checking the url?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload