Skip to content

Commit db83357

Browse files
committed
Add attribute 'original_seeds_file'
1 parent e58e504 commit db83357

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/seedbank.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
module Seedbank
66
class << self
7-
attr_writer :application_root, :seeds_root, :nesting, :matcher
7+
attr_writer :application_root, :seeds_root, :nesting, :matcher, :original_seeds_file
88

99
def application_root
1010
@application_root ||= Pathname.new(Rake.application.original_dir)
@@ -21,6 +21,10 @@ def nesting
2121
def matcher
2222
@matcher ||= '*.seeds.rb'
2323
end
24+
25+
def original_seeds_file
26+
@original_seeds_file ||= File.join(application_root, 'db', 'seeds.rb')
27+
end
2428
end
2529

2630
def self.load_tasks

0 commit comments

Comments
 (0)