Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Bundler downloads dependent gems into a cache location, but you don't want to mess with that if you're looking to make code changes. Anything you change there will be lost later when you update your gems.</p> <p>You'll want to familiarize yourself with the standard rails customization methods. In order of least-to-most intrusive:</p> <ul> <li>Decorators - files in your host application's app folder structure (assets, controllers, models, overrides, views, etc) which change a single method on Spree's objects by using the syntax <code>Spree::[whatever class].class_eval do</code> and then using standard ruby method definitions (followed by <code>end</code>). These files match their Spree counterpart in the same folder, just in your app instead of Spree's source. And with <code>_decorator</code> added to the end of the filename. See an example here: <a href="https://github.com/binaryphile/spree_dibs_1.2/blob/master/app/controllers/spree/admin/payments_controller_decorator.rb" rel="nofollow">https://github.com/binaryphile/spree_dibs_1.2/blob/master/app/controllers/spree/admin/payments_controller_decorator.rb</a></li> <li>Overriding entire Spree files - copy the Spree source file to the same location in your app then make the necessary source changes. This will override Spree's file of the same name (no <code>_decorator</code> this time). You're taking responsibility for migrating all future code changes by Spree to that file into your copy, which is why this is less desirable.</li> <li>Fork the Spree source - change your Gemfile reference to your version instead of Spree. Make your changes to this code directly and run it instead of regular Spree. This is highly undesirable, as it makes upgrading Spree versions very involved and difficult.</li> </ul> <p>If you're planning on making the code reusable, you could also investigate making it into an internal or published extension. See the Spree docs on that approach.</p>
    singulars
    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.
    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