Skip to content

Commit

Permalink
Added fixture helper.
Browse files Browse the repository at this point in the history
  • Loading branch information
technicalpickles committed Mar 13, 2009
1 parent 47dde97 commit db63ee9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/forgery.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ def self.path_to_format(format)
end

def self.external_path_to_format(format)
RAILS_ROOT + '/lib/forgery/formats/' + format.to_s if defined?(RAILS_ROOT)
File.join(RAILS_ROOT, 'lib', 'forgery', 'formats', format.to_s) if defined?(RAILS_ROOT)
end

def self.internal_path_to_format(format)
File.dirname(__FILE__) + '/formats/' + format.to_s
File.join(File.dirname(__FILE__), 'formats', format.to_s)
end

def self.path_to_dictionary(dictionary)
Expand All @@ -54,10 +54,10 @@ def self.path_to_dictionary(dictionary)
end

def self.external_path_to_dictionary(dictionary)
RAILS_ROOT + '/lib/forgery/dictionaries/' + dictionary.to_s if defined?(RAILS_ROOT)
File.join(RAILS_ROOT, 'lib', 'forgery', 'dictionaries', dictionary.to_s) if defined?(RAILS_ROOT)
end

def self.internal_path_to_dictionary(dictionary)
File.dirname(__FILE__) + '/dictionaries/' + dictionary.to_s
File.join(File.dirname(__FILE__), 'dictionaries', dictionary.to_s)
end
end

0 comments on commit db63ee9

Please sign in to comment.