Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #766 from haines/remove_railtie

Remove railtie and just use engine
  • Loading branch information...
commit 660a078b1c0fec74b2675f38b99586de233b9dbe 2 parents c2a4ee8 + b79ded5
@sobrinho sobrinho authored
View
1  lib/formtastic.rb
@@ -1,5 +1,4 @@
# encoding: utf-8
-require 'formtastic/railtie' if defined?(::Rails)
require 'formtastic/engine' if defined?(::Rails)
module Formtastic
View
6 lib/formtastic/engine.rb
@@ -1,7 +1,11 @@
-# Configure Rails 3.1 to have assert_select_jquery() in tests
module Formtastic
# Required for formtastic.css to be discoverable in the asset pipeline
# @private
class Engine < ::Rails::Engine
+ initializer 'formtastic.initialize' do
+ ActiveSupport.on_load(:action_view) do
+ include Formtastic::Helpers::FormHelper
+ end
+ end
end
end
View
12 lib/formtastic/railtie.rb
@@ -1,12 +0,0 @@
-# encoding: utf-8
-
-module Formtastic
- # @private
- class Railtie < Rails::Railtie
- initializer 'formtastic.initialize' do
- ActiveSupport.on_load(:action_view) do
- include Formtastic::Helpers::FormHelper
- end
- end
- end
-end
Please sign in to comment.
Something went wrong with that request. Please try again.