How do I edit or override the footer of ActiveAdmin?

前端 未结 6 1229
南旧
南旧 2021-02-14 09:11

How do I edit or override the footer of Active_Admin?

6条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-14 10:02

    For v.1.0.0.pre5 I found that the Accepted Answer requires a small additiion, namely adding a variable to build as below:

    module ActiveAdmin
      module Views
        class Footer < Component
    
          def build (namespace)
            super :id => "footer"                                                    
            super :style => "text-align: right;"                                     
    
            div do                                                                   
              small "Cool footer #{Date.today.year}"                                       
            end
          end
    
        end
      end
    end
    

提交回复
热议问题