Skip to content

undefined local variable or method `component_name' #158

Description

@rastersysteme

Version: 3.0.0.beta1

After doing:

rails generate komponent:install
rails generate komponent:styleguide
rails generate komponent:examples

I get the following error:

…/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/komponent-3.0.0.beta1/lib/generators/component/templates/examples.html.haml.erb:1:in `template': undefined local variable or method `component_name' for #<Komponent::Generators::ExamplesGenerator:0x00007f8a51bc7108> (NameError)
Did you mean?  @component_name
               component_path

Have a look at examples.html.haml.erb:

%h1 <%= @component_name %>

= cdoc "<%= component_name %>"

There’s a missing @ (same with .slim and .erb files). After using it, everything works fine.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions