Regression in footer.rb, conflict with Redcloth #1805

Closed
adrienkohlbecker opened this Issue Dec 7, 2012 · 2 comments

Comments

Projects
None yet
3 participants
Contributor

adrienkohlbecker commented Dec 7, 2012

In lib/active_admin/views/footer.rb
https://github.com/gregbell/active_admin/blob/master/lib/active_admin/views/footer.rb
The powered_by_message uses the t function, which causes a conflict with Redcloth
Using Active Admin 0.5.1 and Redcloth 4.2.9

Quick fix is to overload the footer definition in app/initializers/active_admin.rb

module ActiveAdmin
  module Views
    module Pages
      class Base < Arbre::HTML::Document
        def build_footer
           # whatever
        end
      end
    end
  end
end

Stack trace :

ArgumentError: wrong number of arguments (2 for 1)
vendor/bundle/ruby/1.9.1/gems/RedCloth-4.2.9/lib/redcloth/erb_extension.rb:16:in `textilize'
vendor/bundle/ruby/1.9.1/gems/activeadmin-0.5.1/lib/active_admin/views/footer.rb:13:in `powered_by_message'
Contributor

pcreux commented Dec 7, 2012

Feel free to make a pull request to call I18n.t instead.

pcreux closed this in 148160e Dec 11, 2012

toxaq commented Jan 11, 2013

Good fix, thanks. Looking forward to 0.5.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment