view_component: Ruby 2.7 support is broken

Steps to reproduce

/app/components/character_employment_history_row_component.rb

class CharacterEmploymentHistoryRowComponent < ActionView::Component::Base
  attr_reader :corporation, :start_date

  def initialize(corporation:, start_date:)
    @corporation = corporation
    @start_date = start_date
  end
end

/app/components/character_employment_history_row_component.html.erb

Anything

Expected behavior

Component render

Actual behavior

Could not find a template file for CharacterEmploymentHistoryRowComponent. excluded from capture: DSN not set

ActionView::Template::Error (Could not find a template file for CharacterEmploymentHistoryRowComponent.):

System configuration

Rails version:

GIT remote: https://github.com/rails/rails.git revision: eef309eb6dda64fe39e51daa408c91f793cd17e7 branch: 6-0-stable

(Current 6-0-stable)

Ruby version: ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-darwin19]

Gem version: actionview-component (1.11.1)

Workaround

If const_source_location_supported? return false, everything rendered. Looks like const_source_location(self.name)[0] return something unexpected.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 15 (6 by maintainers)

Commits related to this issue

Most upvoted comments

@dylnclrk might you be able to look at this?