kss-rails icon indicating copy to clipboard operation
kss-rails copied to clipboard

Cannot view /kss/styleguide

Open emilkarl opened this issue 12 years ago • 3 comments

I have followed the steps in the readme but having trouble viewing the styleguide.

My routes.rb

mount Kss::Engine => '/kss' if Rails.env.development?

I have the files

app/views/kss/home/index.html.erb app/views/kss/home/styleguide.html.erb

styleguide.html.erb includes:

<%= styleguide_block '1.0' do -%>
  <button class="$modifier_class">Example Button</button>
<% end -%>

app/assets/stylesheets/application.css.scss includes:

/*
A button suitable for giving stars to someone.

:hover             - Subtle hover highlight.
.stars-given       - A highlight indicating you've already given a star.
.stars-given:hover - Subtle hover highlight on top of stars-given styling.
.disabled          - Dims the button to indicate it cannot be used.

Styleguide 1.0
*/

/kss shows:

WELCOME!
This is an example styleguide. To customize this page, create a file at app/views/kss/home/index.html.erb.

/kss/styleguide shows:

NoMethodError at /styleguide
undefined method `styleguide_block' for #<#<Class:0x007fce7f4eebc0>:0x007fce7ca23418>

emilkarl avatar May 02 '13 13:05 emilkarl

Experiencing the same. Do we need to manually copy out the contents of the app folder to make this work? Doesn't seem to work after following initial instructions.

woodburndesigns avatar May 24 '13 23:05 woodburndesigns

I'm getting the same error - any fixes?

jem-computer avatar Oct 14 '13 13:10 jem-computer

The styleguide_block is a helper: https://github.com/dewski/kss-rails/blob/master/app/helpers/kss/application_helper.rb#L6-L17

Do you have a full backtrace available?

dewski avatar Oct 14 '13 19:10 dewski