Sha256: 28d90c76a973c290afa2989fa29635714cb8a1d58fa3e660d87a98dca67cdc8a

Contents?: true

Size: 524 Bytes

Versions: 28

Compression:

Stored size: 524 Bytes

Contents

class TurboDeviseController < ApplicationController
  class Responder < ActionController::Responder
    def to_turbo_stream
      controller.render(options.merge(formats: :html))
    rescue ActionView::MissingTemplate => e
      if get?
        raise e
      elsif has_errors? && default_action
        render rendering_options.merge(formats: :html, status: :unprocessable_entity)
      else
        redirect_to navigation_location
      end
    end
  end

  self.responder = Responder
  respond_to :html, :turbo_stream
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
rails_app_generator-0.3.6 templates/addons/devise/app/controllers/turbo_devise_controller.rb
rails_app_generator-0.3.5 templates/addons/devise/app/controllers/turbo_devise_controller.rb
rails_app_generator-0.3.4 templates/addons/devise/app/controllers/turbo_devise_controller.rb
rails_app_generator-0.3.3 templates/addons/devise/app/controllers/turbo_devise_controller.rb
rails_app_generator-0.3.2 templates/addons/devise/app/controllers/turbo_devise_controller.rb
rails_app_generator-0.3.1 templates/addons/devise/app/controllers/turbo_devise_controller.rb
rails_app_generator-0.3.0 templates/addons/devise/app/controllers/turbo_devise_controller.rb
rails_app_generator-0.2.43 templates/addons/devise/app/controllers/turbo_devise_controller.rb
rails_app_generator-0.2.42 templates/addons/devise/app/controllers/turbo_devise_controller.rb
rails_app_generator-0.2.41 templates/addons/devise/app/controllers/turbo_devise_controller.rb
rails_app_generator-0.2.40 templates/addons/devise/app/controllers/turbo_devise_controller.rb
rails_app_generator-0.2.39 templates/addons/devise/app/controllers/turbo_devise_controller.rb
rails_app_generator-0.2.38 templates/addons/devise/app/controllers/turbo_devise_controller.rb
rails_app_generator-0.2.37 templates/addons/devise/app/controllers/turbo_devise_controller.rb
rails_app_generator-0.2.36 templates/addons/devise/app/controllers/turbo_devise_controller.rb
rails_app_generator-0.2.35 templates/addons/devise/app/controllers/turbo_devise_controller.rb
rails_app_generator-0.2.34 templates/addons/devise/app/controllers/turbo_devise_controller.rb
rails_app_generator-0.2.33 templates/addons/devise/app/controllers/turbo_devise_controller.rb
rails_app_generator-0.2.32 templates/addons/devise/app/controllers/turbo_devise_controller.rb
rails_app_generator-0.2.31 templates/addons/devise/app/controllers/turbo_devise_controller.rb