Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: no implicit conversion of Symbol into Integer #3

Open
t2 opened this issue Nov 1, 2023 · 3 comments
Open

TypeError: no implicit conversion of Symbol into Integer #3

t2 opened this issue Nov 1, 2023 · 3 comments

Comments

@t2
Copy link

t2 commented Nov 1, 2023

class ApplicationController < ActionController::Base
  before_action :enable_hotflash
end
class UsersController < ApplicationController
  def index
    respond_to do |format|
      format.html { render 'settings/index' }
    end
  end
end

I am getting a TypeError with the above code. When I comment our the before_action then it works as before so it's something in HotFlash. What information can I provide that would help debug?

@t2
Copy link
Author

t2 commented Nov 10, 2023

@joshmn I see the issue.

# Invitations Controller
def edit
  set_minimum_password_length
  resource.invitation_token = params[:invitation_token]
  render :edit
end

render_args = [:edit]

# HotFlash - action.rb

def render?(render_args)
  return false unless enabled?
  return false unless render_args[0] && render_args[0][:turbo_stream]
  true
end

If you are checking for turbo_stream I think we need to change to this?

def render?(render_args)
  return false unless enabled?
  return false unless render_args[0] && render_args[0] == :turbo_stream
  true
end

@cmer
Copy link

cmer commented Feb 26, 2024

Same error here.

@erlingur
Copy link

Same here, can this be merged @joshmn? Or at least taken a look at? 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants