Updated README, fix for using without configuration #3

Merged
merged 1 commit into from Mar 10, 2012
View
@@ -23,7 +23,7 @@ And update your bundle with <tt>bundle install</tt>
To be able to use the gem, you must first configure it. If you're on Rails, insert the following code in <tt>config/initializers/sisow.rb</tt>:
- Sisow.setup do |config|
+ Sisow.configure do |config|
config.merchant_key = 'your-merchant-key'
config.merchant_id = 'your-merchant-id'
View
@@ -38,7 +38,7 @@ def validate!; raise 'Implement me in a subclass'; end
private
def can_perform?
- !Sisow.configuration.merchant_id.empty? && !Sisow.configuration.merchant_key.empty?
+ !(Sisow.configuration.merchant_id.nil? || Sisow.configuration.merchant_id.empty?) && !(Sisow.configuration.merchant_key.nil? || Sisow.configuration.merchant_key.empty?)
end
def uri