diff --git a/README.markdown b/README.markdown index 8716ddb..49eba67 100755 --- a/README.markdown +++ b/README.markdown @@ -57,7 +57,7 @@ Thrid shows the 2d table for variant choosing. ## Instalation For git users: -git submodule add git://github.com/swistak/spree-enchanced-option-types.git vendor/enchanced_option_types +git submodule add git://github.com/swistak/spree-enchanced-option-types.git vendor/extensions/enchanced_option_types for others (or git users that don't like submodules): ruby script/extension install git://github.com/swistak/spree-enchanced-option-types.git diff --git a/app/models/option_value_decorator.rb b/app/models/option_value_decorator.rb index 4feb301..a2498ce 100755 --- a/app/models/option_value_decorator.rb +++ b/app/models/option_value_decorator.rb @@ -1,5 +1,5 @@ OptionValue.class_eval do - validates_numericality_of :amount + validates_numericality_of :amount, :allow_nil => true after_update :adjust_variant_prices, :if => :amount_changed? diff --git a/app/views/products/_eot_includes.html.erb b/app/views/products/_eot_includes.html.erb index 05d25de..93f124e 100644 --- a/app/views/products/_eot_includes.html.erb +++ b/app/views/products/_eot_includes.html.erb @@ -20,4 +20,4 @@ end And if you really really really want to please make sure they are wrapped into document ready event (it's not needed here as we put script AFTER everything we need is in DOM and loaded) %> - \ No newline at end of file +<%= javascript_include_tag('enchanced-option-types.js') %> \ No newline at end of file diff --git a/enchanced_option_types_extension.rb b/enchanced_option_types_extension.rb index c0f15fb..aeb4ff7 100755 --- a/enchanced_option_types_extension.rb +++ b/enchanced_option_types_extension.rb @@ -16,8 +16,8 @@ def activate base = File.dirname(__FILE__) Dir.glob(File.join(base, "app/**/*_decorator.rb")){|c| load(c)} - FileUtils.cp Dir.glob(File.join(base, "public/stylesheets/*.css")), File.join(RAILS_ROOT, "public/stylesheets/") - FileUtils.cp Dir.glob(File.join(base, "public/javascripts/*.js")), File.join(RAILS_ROOT, "public/javascripts") +# FileUtils.cp Dir.glob(File.join(base, "public/stylesheets/*.css")), File.join(RAILS_ROOT, "public/stylesheets/") +# FileUtils.cp Dir.glob(File.join(base, "public/javascripts/*.js")), File.join(RAILS_ROOT, "public/javascripts") # make your helper avaliable in all views Spree::BaseController.class_eval do