Valid resources are underscore, not downcase
Robert Wünsch
committed May 28, 2013
commit d4e668d2914f52b62d51ea3b4641368399a84363
Showing 1
changed file with
1 additions
and 1 deletions
locomotive/wagon.rb b/lib/locomotive/wagon.rb
+1
-1
| @@ | @@ -166,7 +166,7 @@ module Locomotive |
| protected | |
| def self.validate_resources(resources, writers_or_readers) | |
| return if resources.nil? | |
| - | valid_resources = writers_or_readers.map { |thing| thing.to_s.demodulize.gsub(/Writer$|Reader$/, '').downcase } |
| + | valid_resources = writers_or_readers.map { |thing| thing.to_s.demodulize.gsub(/Writer$|Reader$/, '').underscore } |
| resources.each do |resource| | |
| raise ArgumentError, "'#{resource}' resource not recognized. Valid resources are #{valid_resources.join(', ')}." unless valid_resources.include?(resource) | |
| end | |