app/helpers/tramway/event/application_helper.rb in tramway-event-1.2.4 vs app/helpers/tramway/event/application_helper.rb in tramway-event-1.2.5

- old
+ new

@@ -1,18 +1,10 @@ -require "tramway/collection" +require "tramway/collections/helper" module Tramway module Event module ApplicationHelper include ::FontAwesome::Rails::IconHelper - #extend ::Tramway::Collection::Helper - def collection_list_by(name:) - require name # needed to load class name with collection - unless ::Tramway::Collection.descendants.map(&:to_s).include?(name.camelize) - raise "There no such collection named #{name.camelize}. Please create class with self method `list` and extended of `Tramway::Collection`" - end - - name.camelize.constantize.list - end + include ::Tramway::Collections::Helper end end end