Sha256: 175d90e77c381f9f1f6267e9d507e86c31ca858d7be339e0b5664fa482fb7fa9

Contents?: true

Size: 306 Bytes

Versions: 9

Compression:

Stored size: 306 Bytes

Contents

module UltimateTurboModal::Helpers
  module StreamHelper
    def modal(message)
      case message.to_s.downcase.to_sym
      when :close, :hide
        turbo_stream_action_tag "modal", message: "hide"
      else
        raise ArgumentError, "Unknown modal message: #{message}"
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ultimate_turbo_modal-1.3.1 lib/ultimate_turbo_modal/helpers/stream_helper.rb
ultimate_turbo_modal-1.3.0 lib/ultimate_turbo_modal/helpers/stream_helper.rb
ultimate_turbo_modal-1.2.1 lib/ultimate_turbo_modal/helpers/stream_helper.rb
ultimate_turbo_modal-1.2.0 lib/ultimate_turbo_modal/helpers/stream_helper.rb
ultimate_turbo_modal-1.1.2 lib/ultimate_turbo_modal/helpers/stream_helper.rb
ultimate_turbo_modal-1.1.1 lib/ultimate_turbo_modal/helpers/stream_helper.rb
ultimate_turbo_modal-1.1.0 lib/ultimate_turbo_modal/helpers/stream_helper.rb
ultimate_turbo_modal-1.0.3 lib/ultimate_turbo_modal/helpers/stream_helper.rb
ultimate_turbo_modal-1.0.0 lib/ultimate_turbo_modal/helpers/stream_helper.rb