Permalink
Browse files

Course correct for broken assets without engine.

Without a Rails engine in place, the asset detection breaks. This
restores the engine, but without the automatic helper inclusion,
which will no longer be supported.
  • Loading branch information...
tylerhunt committed Dec 4, 2012
1 parent 82e71e8 commit aa93bf904e9f59e00cb7b4b54fe2e44341cec532
Showing with 4 additions and 21 deletions.
  1. +3 −14 README.md
  2. +1 −0 lib/formulate.rb
  3. +0 −7 lib/formulate/engine.rb
View
@@ -21,13 +21,6 @@ Add this line to your application's `Gemfile`:
gem 'formulate'
```
-If you want to use the Formulate's `#form_for` helper by default, an engine
-is provided that will override Rails' helper:
-
-``` ruby
-gem 'formulate', require: 'formulate/engine'
-```
-
And then execute:
$ bundle
@@ -39,9 +32,9 @@ Or install it yourself as:
## Usage
-Formulate provides a helper module that can be included in your Rails
-controllers. You can also load the helper in your `ApplicationController` to
-use it across your whole app.
+Formulate provides a helper module to be included in your Rails controllers.
+You can also load the helper in your `ApplicationController` to use it across
+your entire app.
``` ruby
class ApplicationController < ActionController::Base
@@ -53,10 +46,6 @@ Formulate doesn't clobber any of the built-in form builder methods, so your
forms should continue to work without modification, giving you the ability to
selectively begin using Formulate in your applications where you see fit.
-If you're using the engine, the form builder will be used automatically
-whenever the `#form_for` helper is called, so you don't need to do anything
-special to start using it.
-
## Styles
View
@@ -1,4 +1,5 @@
require 'formulate/version'
+require 'formulate/engine'
module Formulate
extend ActiveSupport::Autoload
View
@@ -1,11 +1,4 @@
-require 'formulate'
-
module Formulate
class Engine < ::Rails::Engine
- initializer 'formulate.initialize' do |app|
- ActiveSupport.on_load(:action_view) do
- include Formulate::FormHelper
- end
- end
end
end

0 comments on commit aa93bf9

Please sign in to comment.