Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Make Rails 3 load Machinist as the fixture_replacement #101

Closed
wants to merge 1 commit into from

1 participant

@indirect

This just means that Rails 3 will automatically know to use Machinist as the fixture replacement as long as you put "machinist" in your Gemfile.

@indirect indirect closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 19, 2011
  1. @indirect
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 1 deletion.
  1. +1 −1  lib/machinist.rb
  2. +5 −0 lib/machinist/railtie.rb
View
2  lib/machinist.rb
@@ -2,4 +2,4 @@
require 'machinist/exceptions'
require 'machinist/lathe'
require 'machinist/machinable'
-
+require 'machinist/railtie' if defined?(Rails::Railtie)
View
5 lib/machinist/railtie.rb
@@ -0,0 +1,5 @@
+module Machinist
+ class Railtie < ::Rails::Railtie
+ config.generators.fixture_replacement :machinist
+ end
+end
Something went wrong with that request. Please try again.