Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fixes spree custom user generator if spree initializer is not present #1619

Closed
wants to merge 1 commit into from

2 participants

@tvdeyen

This fixes the custom user generator by creating a spree initializer if no one is present.

@radar radar closed this in 5b0a5dd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 1, 2012
  1. @tvdeyen
This page is out of date. Refresh to see the latest.
View
3  core/lib/generators/spree/custom_user/custom_user_generator.rb
@@ -14,7 +14,8 @@ def generate
template 'migration.rb.tt', "db/migrate/#{Time.now.strftime("%Y%m%d%H%m%S")}_add_spree_fields_to_custom_user_table.rb"
template 'authentication_helpers.rb.tt', "lib/spree/authentication_helpers.rb"
- append_file 'config/initializers/spree.rb' do
+ file_action = File.exist?('config/initializers/spree.rb') ? :append_file : :create_file
+ send(file_action, 'config/initializers/spree.rb') do
%Q{require 'spree/authentication_helpers'\n}
end
end
Something went wrong with that request. Please try again.