jlindley / accessible_form_builder forked from shift/accessible_form_builder

Major refactoring, blueprint support, bare_ accessors to original methods.

This URL has Read+Write access

accessible_form_builder / init.rb
100644 14 lines (13 sloc) 0.482 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
require 'accessible_form_builder'
ActionView::Base.send :include, AfForm
 
ActionController::Base.class_eval do
  def af_stylesheets(cache=false)
    stylesheets = ['base/grid_forms']
    cache ? stylesheets << {:cache => 'base/grid_forms_cache'} : stylesheets
  end
  def af_javascripts(cache=false)
    javascripts = ['base/inline_mozilla_hack']
    cache ? javascripts << {:cache => 'base/grid_forms_cache'} : javascripts
  end
  helper_method :af_stylesheets, :af_javascripts
end