2012-06-06 23 views

Respuesta

19

Para agregar al comentario de Mexxer. Ir a `config/inicializadores/active_admin.rb

En la parte inferior de la página, encontrará lo siguiente:

# == Register Stylesheets & Javascripts 
# 
# We recommend using the built in Active Admin layout and loading 
# up your own stylesheets/javascripts to customize the look 
# and feel. 
# 
# To load a stylesheet: 
# config.register_stylesheet 'my_stylesheet.css' 
# 
# To load a javascript file: 
# config.register_javascript 'my_javascript.js' 

de comentario la última línea y reemplazar my_javascript.js con su archivo, como este ...

# To load a javascript file: 
config.register_javascript 'invoices.js' 

Ese archivo se puede situar en app/assets/javascripts/invoices.js

5

Esto también puede ser relevante:

# The Active Admin equivalent of putting this in your application layout: 
# <head> 
# <%= cloudinary_js_config %> 
# </head> 

module ActiveAdmin 
    module Views 
    module Pages 
     class Base < Arbre::HTML::Document 

     alias_method :original_build_head, :build_active_admin_head 

     def build_active_admin_head 
      original_build_head 

      within @head do 
      text_node include_gon 
      end 
     end 

     end 
    end 
    end 
end 

Fuente: https://gist.github.com/seanlinsley/9786622

Cuestiones relacionadas