Questions tagged [deface]

Deface is a library that allows you to customize HTML (ERB, Haml and Slim) views in a Rails application without editing the underlying view.

Deface is a library that allows you to customize HTML (ERB, Haml and Slim) views in a Rails application without editing the underlying view.

It allows you to easily target html & erb elements as the hooks for customization using CSS selectors as supported by Nokogiri.

63 questions
0
votes
1 answer

Using a drop down select menu instead of radio buttons for Spree 3.1.0 variants (Rails 4.2)

As the title says, I'm using Spree 3.1.0 on Rails 4.2 to build a store. On the product Show page, I'm trying to use Deface to replace the radio buttons with a drop-down, as per the client's request. I have the dropdown functioning, but the price…
pholls
  • 35
  • 7
0
votes
1 answer

Deface link_to Rails Spree

I am new to Spree. I want to deface link_to rails helper. i have spree/checkout/_new_user file and it contain following: <%= link_to Spree.t(:login_as_existing), spree.login_path %> i want to add remote: true to above link_to using deface. Please…
Santosh Sharma
  • 2,114
  • 1
  • 17
  • 28
0
votes
1 answer

Rails spree : How to override login partial using deface?

I'm trying to override login page in spree using deface, but I can't access the login partial using the following code Deface::Override.new( :virtual_path => 'spree/shared/_login', :name => 'override login', :replace=> "body", :text=>…
user2548447
  • 25
  • 1
  • 1
  • 4
0
votes
1 answer

Debugging deface templates

I'm looking to use deface v1.0.2 to modify some haml templates in an existing, complex rails 4.2 application. From this issue, it looks like haml templates are compiled to erb, and then processed by nokogiri, then turned into HTML. I'm just looking…
mooreds
  • 4,932
  • 2
  • 32
  • 40
0
votes
1 answer

'method not found' after using controller decorator

I'm trying to add a feature to the spree admin page to resend the shipment email. I'm getting this error, ActionView::Template::Error (undefined method `resend_shipment_email_admin_order_url' for #<#:0x00000006683700>): …
sybind
  • 3,418
  • 5
  • 25
  • 25
0
votes
1 answer

how can i use deface to change html that has tags with erb

I am new to spree and trying to make changes to the address form during checkout by removing some fields using deface. Which selector will I use now that the id value is in erb format. Here is the code sample from the form partial <% address_id…
vickris
  • 293
  • 2
  • 11
0
votes
1 answer

Spree custom landing page

I am learning Spree commerce and trying to override the landing page using Deface. The file I need to override is: spree/frontend/app/views/spree/home/index.html.erb <% content_for :sidebar do %>
ChrisEstanol
  • 123
  • 9
0
votes
1 answer

Change Spree commerce with Deface

I'm learning Spree because I want to create an ecommerce with it. I installed successfully Spree and now I would like to customize the standard spree template with deface. I'm trying to delete the table with "product-properties" id in the products…
splunk
  • 6,435
  • 17
  • 58
  • 105
0
votes
1 answer

I get confuse about deface at layout.html.erb that which relate with index.html.erb of spree commerce

I tried overnight for a week to findout how to customize index.html.erb but no luck.I use spree v.3.0 rc4 (bootstrap version) , I'd like to have an image show on index.html.erb My scss file like below #intro { display: table; width: 100%; …
user2533820
  • 73
  • 3
  • 6
0
votes
2 answers

How to replace a Template using Deface

I'm new to rails and I've set up a standard spree e commerce solution. I now want to customize the default templates and styles. According to the spree documentation [1], the best way to do so is using Deface. Unfortunately, I can't figure out the…
Ronin
  • 7,322
  • 6
  • 36
  • 54
0
votes
1 answer

Overriding spree views using deface

I am trying to override some view using Deface but I got this error and warning in the console: Deface: 1 overrides found for 'spree/shared/_header' Deface: 'header_background' matched 1 times with 'div#spree-header' Deface: [WARNING] No :original…
mimou
  • 65
  • 10
0
votes
1 answer

Customizing spree e-commerce view

I am while customizing my spree e-commerce application. At first I added the spree_bootstrap_frontend gem and I want to customize the oredres/edit view as follow: Deface::Override.new(:virtual_path =>"spree/orders/edit", :name…
mimou
  • 65
  • 10
0
votes
1 answer

Spree with deface - Use deface to replace contents of block

I have an erb block: <% content_for :sidebar do %> <% if defined? @products && defined? @taxon %> <%= render :partial => "spree/shared/filters" %> <% elsif defined? @taxonomies %> <%= render :partial => "spree/shared/taxonomies" %> …
Pavel Tarno
  • 1,324
  • 1
  • 12
  • 29
0
votes
0 answers

Website Defaced - Fix Redirect

my website has been defaced. I went into the website files and found the php file they injected and deleted it, but all the webpages still attempt to redirect to it. The .htaccess file was modified as follows: RewriteEngine On RewriteCond…
Joe Balin
  • 177
  • 2
  • 17
0
votes
1 answer

Deface not working from engine

I'm trying to use deface gem as a way to overwrite my core app views from a modules (engines). Deface works just great if i'm creating a .deface files in core_app/app/overrides/*. However, when i want to use it from my engine (by creating exact same…
mbajur
  • 4,406
  • 5
  • 49
  • 79