Merge pull request #89 from finnlabs/fix/widget-autoloading

Fix widget autoloading after i18n update
pull/6827/head
Oliver Günther 8 years ago committed by GitHub
commit e431cd9a3a
  1. 6
      lib/reporting_widget.rb
  2. 5
      lib/widget/base.rb
  3. 3
      lib/widget/filters.rb

@ -19,7 +19,7 @@
require_dependency 'reporting_engine/helpers/reporting_helper'
class Widget < ActionView::Base
class ReportingWidget < ActionView::Base
include ActionView::Helpers::TagHelper
include ActionView::Helpers::AssetTagHelper
include ActionView::Helpers::FormTagHelper
@ -63,5 +63,5 @@ class Widget < ActionView::Base
end
end
ActionView::Base.send(:include, Widget::RenderWidgetInstanceMethods)
ActionController::Base.send(:include, Widget::RenderWidgetInstanceMethods)
ActionView::Base.send(:include, ReportingWidget::RenderWidgetInstanceMethods)
ActionController::Base.send(:include, ReportingWidget::RenderWidgetInstanceMethods)

@ -19,7 +19,9 @@
require 'digest/sha1'
class Widget::Base < Widget
require_dependency 'reporting_widget'
module ::Widget
class Base < ::ReportingWidget
attr_reader :engine, :output
##
@ -109,3 +111,4 @@ class Widget::Base < Widget
@output = canvas
end
end
end

@ -17,7 +17,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#++
class Widget::Filters < Widget::Base
require_dependency 'widget/base'
class Widget::Filters < ::Widget::Base
def render
spacer = content_tag :li, '', class: 'advanced-filters--spacer'

Loading…
Cancel
Save