237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
|
# File 'lib/generators/solidus/install/install_generator.rb', line 237
def install_routes
routes_file_path = File.join('config', 'routes.rb')
unless File.read(routes_file_path).include? CORE_MOUNT_ROUTE
insert_into_file routes_file_path, after: "Rails.application.routes.draw do\n" do
" # This line mounts Solidus's routes at the root of your application.\n # This means, any requests to URLs such as /products, will go to Spree::ProductsController.\n # If you would like to change where this engine is mounted, simply change the :at option to something different.\n #\n # We ask that you don't use the :as option here, as Solidus relies on it being the default of \"spree\"\n \#{CORE_MOUNT_ROUTE}, at: '/'\n\n RUBY\n end\n end\n\n unless options[:quiet]\n puts \"*\" * 50\n puts \"We added the following line to your application's config/routes.rb file:\"\n puts \" \"\n puts \" \#{CORE_MOUNT_ROUTE}, at: '/'\"\n end\nend\n"
|