Hi,
Im getting this strange error when trying to delete an employee, im
guessing its something to do with one of the has_many relationships but
how do i know which one.
ndefined method `table_name’ for File:Class
vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb:152:in
construct_sql' vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb:6:in
initialize’
vendor/rails/activerecord/lib/active_record/associations.rb:1032:in
new' vendor/rails/activerecord/lib/active_record/associations.rb:1032:in
files’
vendor/rails/activerecord/lib/active_record/callbacks.rb:309:in
callback' vendor/rails/activerecord/lib/active_record/callbacks.rb:309:in
callback’
vendor/rails/activerecord/lib/active_record/callbacks.rb:304:in each' vendor/rails/activerecord/lib/active_record/callbacks.rb:304:in
callback’
vendor/rails/activerecord/lib/active_record/callbacks.rb:294:in
destroy_without_transactions' vendor/rails/activerecord/lib/active_record/transactions.rb:104:in
destroy’
vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:66:in
transaction' vendor/rails/activerecord/lib/active_record/transactions.rb:80:in
transaction’
vendor/rails/activerecord/lib/active_record/transactions.rb:100:in
transaction' vendor/rails/activerecord/lib/active_record/transactions.rb:104:in
destroy’
app/controllers/employees_controller.rb:131:in destroy' -e:4:in
load’
-e:4
Anyone got any ideas?
JB