Class: Peck::Rails::Model
- Inherits:
-
Object
- Object
- Peck::Rails::Model
- Defined in:
- lib/peck_on_rails.rb
Class Method Summary collapse
Class Method Details
.init(context, context_type, subject) ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/peck_on_rails.rb', line 42 def self.init(context, context_type, subject) if [:model, :controller, :helper].include?(context_type) Peck.log("Peck::Rails::Model.init") context.class_eval do include ::ActiveRecord::TestFixtures self.fixture_path = File.join(::Rails.root, 'test', 'fixtures') fixtures :all define_method(:method_name) { self.class.label } end end end |