Skip to content

Latest commit

 

History

History
46 lines (28 loc) · 1.09 KB

README.rdoc

File metadata and controls

46 lines (28 loc) · 1.09 KB

Test app for rocket-tag solr foreman tag-it unicorn

This is a demo app to reproduce the bug for

undefined local variable or method ‘cache_tags’ for #<Product:…

Getting Started

  1. After cloning and bundle install

  2. cp config/database.yml.example config/database.yml

and change for your database credentials

  1. rake db:create db:migrate

  2. foreman start

Reproducing the bug.

Visit localhost:3000

click on add a new product

add it.

Then go back to the code and change something on the product.rb e.g. add an attr_accessor :something

save and go back to the browser. Try to edit or add a new an you’ll receive the undefined local variable or method ‘cache_tags’ for #<Product:…

After reading the issues reported before for Rocket-tag and confirm that nothing fix it I’ve tried to add this to model

# Minor hack added to make Rocket_Tag work with Tag-it plugin
# If this method doesn't exists then the tag attribute must be present
# on the form.
def cache_tags
  super
end

At first sight it looks like it’ll work. But after a minor changes on the model, the error came back.