Created
July 19, 2010 16:00
-
-
Save teeparham/481589 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Samples for formatting additional Product fields in Spree Admin | |
# SelectField: adds a select box with values 1..20 | |
# WideField: adds a standard text box, but with a specified size | |
# HugeField: adds a text area with a specified number of columns | |
Variant.additional_fields += [ | |
{ :name => 'SelectField', | |
:only => [:product], | |
:use => 'select', | |
:value => Proc.new{ (1..20).collect{|i| [i,i]} } | |
}, | |
{ :name => 'WideField', | |
:only => [:product], | |
:options => { :size => '180'} | |
}, | |
{ :name => 'HugeField', | |
:only => [:product], | |
:use => 'text_area', | |
:options => { :cols => '100'} | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment