mbleigh / acts-as-taggable-on

A tagging plugin for Rails applications that allows for custom tagging along dynamic contexts.
http://mbleigh.lighthouseapp.com/projects/10116-acts-as-taggable-on
MIT License
4.96k stars 1.2k forks source link

Mysql2::Error: Incorrect table name '': SHOW FULL FIELDS FROM `` #979

Open denmarkmeralpis opened 4 years ago

denmarkmeralpis commented 4 years ago

I got an issue when trying to save tags. Here's my model

# application_record.rb
class ApplicationRecord < ActiveRecord::Base
  act_as_taggable
end

# foo.rb
class Foo < ApplicationRecord
end

Here's what I did

# irb
foo = Foo.new
foo.tag_list = 'abc,def,ghi'
foo.save

then it raises an error

Traceback (most recent call last):
        1: from (irb):3
ActiveRecord::StatementInvalid (Mysql2::Error: Incorrect table name '': SHOW FULL FIELDS FROM ``)