Skip to content

Instantly share code, notes, and snippets.

@binaryphile
Created May 11, 2012 17:17
Show Gist options
  • Select an option

  • Save binaryphile/2661098 to your computer and use it in GitHub Desktop.

Select an option

Save binaryphile/2661098 to your computer and use it in GitHub Desktop.
Deface override to lengthen names on Spree product index page
#Correction:
Deface::Override.new(:virtual_path => 'spree/shared/_products',
:name => 'lengthen_product_name',
:replace => 'code[erb-loud]:contains("link_to truncate(product.name, :length => 50)")',
:text => '<%= link_to product.name, product, :class => "info", :itemprop => "name", :title => product.name %>'
)
@GeekOnCoffee
Copy link
Copy Markdown

Correction:

Deface::Override.new(:virtual_path => 'spree/shared/_products',
:name => 'lengthen_product_name',
:replace => 'code[erb-loud]:contains("link_to truncate(product.name, :length => 50)")',
:text => '<%= link_to product.name, product, :class => "info", :itemprop => "name", :title => product.name %>'
)

@binaryphile
Copy link
Copy Markdown
Author

Changed to incorporate your fix, GeekOnCoffee. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment