Sha256: a02832186cc9030dae4e5d29fddbb2d5061e232e715836a295ff244c6b3eac3f

Contents?: true

Size: 665 Bytes

Versions: 6

Compression:

Stored size: 665 Bytes

Contents

module Voom
  module Presenters
    module Plugins
      module <%= classify(name) %>
        # Web Client Actions set up the the event handler data that will be consumed by a javascript class
        # This data will be stored on the DOM as a data attribute defined in the
        # file: views/components/assets/<%= underscore(name) %>.erb
      module WebClientActions
        def action_data_<%= underscore(name) %>_action(action, _parent_id, *)
          # Type, URL, Options, Params (passed into javascript event/action classes)
          [action.type, action.url, action.options.to_h, action.attributes.to_h]
        end
      end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
voom-presenters-2.1.2 lib/voom/presenters/generators/templates/plugin/lib/voom/presenters/plugins/web_client/components/actions/data.rb.tt
voom-presenters-2.1.0 lib/voom/presenters/generators/templates/plugin/lib/voom/presenters/plugins/web_client/components/actions/data.rb.tt
voom-presenters-2.0.3 lib/voom/presenters/generators/templates/plugin/lib/voom/presenters/plugins/web_client/components/actions/data.rb.tt
voom-presenters-2.0.2 lib/voom/presenters/generators/templates/plugin/lib/voom/presenters/plugins/web_client/components/actions/data.rb.tt
voom-presenters-2.0.1 lib/voom/presenters/generators/templates/plugin/lib/voom/presenters/plugins/web_client/components/actions/data.rb.tt
voom-presenters-2.0.0 lib/voom/presenters/generators/templates/plugin/lib/voom/presenters/plugins/web_client/components/actions/data.rb.tt