deface

How to override/change lay-out of Ruby on Rails spree app after installing Bootstrap gem?

烂漫一生 提交于 2019-12-23 04:29:32
问题 I have a Spree Commerce application with the spree_bootstrap gem installed by adding gem 'spree_bootstrap', github: 'jdutil/spree_bootstrap' to the Gemfile. Now on the main page I have all the familiar bootstrap divs as <div class="container row"> and <ul id="main-nav-bar" class="inline"> . I am new to Rails and I want to change the lay-out masterpage by adding my own custom navbar and other tweaks. Unfortunately application.html.rb is a virtually empty page and I don't think that is the one

Rails Deface on input erb element, cannot override it correctly

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-13 06:01:13
问题 I am trying to override the qty input element in the products/_cart_form , to avoid a user modifying the qty Should the Deface override be performed on the erb code or the html I used the following override wo any success seems to be a mix of html selector and erb code .... messy and tricky , obviously no example like this on the Deface github readme Deface::Override.new( :virtual_path => %q{spree/products/_cart_form}, :name => %q{read_only_qty_cart_form}, :set_attributes => %q{#cart-form

access rails url helper from deface

女生的网名这么多〃 提交于 2019-12-11 04:56:21
问题 I am including Spree to an existing site. I am changing the spree header with Deface to render my site's header instead. Therefore I use the following Deface DSL code <!-- replace_contents "header[data-hook]" --> <%= render :partial => "layouts/my_site_header.html.erb" %> And inside _my_site_header.html.erb I have something like this <ul> <li><%= link_to "Home", home_path %></li> <li><%= link_to "Game", game_path %></li> <li><%= link_to "Community", community_path %></li> </ul> Which gives me