Turbo Power Rails Versions Save

Power-pack for Turbo Streams

v0.6.1

4 months ago

Changed

  • Update scroll_into_view stream helper to accept options in #40 by @marcoroth

Commits

Full Changelog: https://github.com/marcoroth/turbo_power-rails/compare/v0.6.0...v0.6.1

v0.6.0

5 months ago

New Actions

Added

New Contributors

Commits

Full Changelog: https://github.com/marcoroth/turbo_power-rails/compare/v0.5.0...v0.6.0

v0.5.0

7 months ago

Added

This release introduces the TurboPower::Broadcasts and TurboPower::Broadcastable modules which can be used to broadcast any TurboPower custom action in jobs, controllers, models or wherever you can run Ruby code within your app.

The TurboPower::Broadcasts module provides the broadcast actions in synchronous and asynchronous form for the Turbo::StreamsChannel, meaning an action like console_log can be used like:

Turbo::StreamsChannel.broadcast_console_log_to(:posts, message: "Hello World", level: :info)
Turbo::StreamsChannel.broadcast_console_log_later_to(:posts, message: "Hello World", level: :info)

Which would broadcast the console_log action to any client which is subscribed via:

<%= turbo_stream_from :posts %>

The TurboPower::Broadcastable module allows actions to be broadcasted from ActiveRecord models, like:

# app/models/post.rb

class Post < ApplicationRecord
  after_save do
    # broadcasting to all clients which are subscribed via:
    # <%= turbo_stream_from @post %>
    broadcast_console_log(message: "Hello World", level: "Warn")
    broadcast_console_log_later(message: "Hello World", level: "Warn")

    # broadcasting to all clients which are subscribed via the `:posts` stream identifier:  
    # <%= turbo_stream_from :posts %>
    broadcast_console_log_to(:posts, message: "Hello World", level: "Warn")
    broadcast_console_log_later_to(:posts, message: "Hello World", level: "Warn")
  end
end

Commits

Full Changelog: https://github.com/marcoroth/turbo_power-rails/compare/v0.4.0...v0.5.0

v0.4.0

8 months ago

New Actions

Added

New Contributors

Commits

Full Changelog: https://github.com/marcoroth/turbo_power-rails/compare/v0.3.1...v0.4.0

v0.3.1

1 year ago

Updated

Fixed

Commits

Full Changelog: https://github.com/marcoroth/turbo_power-rails/compare/v0.3.0...v0.3.1

v0.3.0

1 year ago

New Actions

See more at: https://github.com/marcoroth/turbo_power/releases/tag/v0.3.0

Added

Changed

Commits

Full Changelog: https://github.com/marcoroth/turbo_power-rails/compare/v0.2.0...v0.3.0

v0.2.0

1 year ago

New Actions

Changed

Commits

Full Changelog: https://github.com/marcoroth/turbo_power-rails/compare/v0.1.6...v0.2.0

v0.1.6

1 year ago

New Actions

Changed

Commits

Full Changelog: https://github.com/marcoroth/turbo_power-rails/compare/v0.1.5...v0.1.6

v0.1.5

1 year ago

New Actions

Changed

New Contributors

Commits

Full Changelog: https://github.com/marcoroth/turbo_power-rails/compare/v0.1.3...v0.1.5