-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NameError: uninitialized constant Action #79
Comments
Could you provide full stack trace? Maybe this is related to #66 ? Also could you provide database schema for |
Here is the schema for Employees create_table "employees", force: :cascade do |t|
t.integer "ckfinder_file_id"
t.integer "colleague_id"
t.string "email", limit: 255, null: false
t.string "last_name", limit: 255
t.string "first_name", limit: 255
t.string "preferred_name", limit: 255
t.string "middle_name", limit: 255
t.json "settings", default: {"preferred_instead_of_first_name"=>false}
t.datetime "deleted_at"
t.datetime "created_at"
t.datetime "updated_at"
t.string "prefix", limit: 255
t.string "suffix", limit: 255
t.integer "instructor_id"
end and here is the stack trace Backtrace: |
Hm, could you try temporally change def destroy
@employee = Employee.find(params[:id])
@employee.colleague.try(:destroy)
@employee.ckfinder_file.try(:destroy)
@employee.destroy
respond_with @employee, location: employees_url
end PS. Seems that backtrace is broken 😢 |
That one at least gave me a new error Exception: Here is the backtrace, hopefully this one will be of more help. Backtrace: |
Hm, could you attach an screenshot of backtrace and/or provide a 59 line of |
line 59 is @employee.colleague.try(:destroy) |
Interesting, could you also provide an associations ( |
belongs_to :instructor looking at this I made the following changes
and still got the original error message of uninitialized constant Action |
Could you try to remove |
that breaks most of my views across the site |
Yeah, sure, but could you check, does same exception throwing after it? Seems that problem could be in the association with |
ran it through the development console and got this NameError: undefined local variable or method |
Does you remove |
yes I did |
Could you provide next 2-5 lines from backtrace ( |
lines 428 through 435 |
Sorry, not from attribute_methods.rb, just from backtrace :-) |
When you say backtrace are you meaning this? [2] pry(main)> Employee.find(152).destroy |
Awesome, this stack trace is much more readable! Does you see any lines after |
Nope, that is the entire output from start to finish |
Ok, thank you for active participation, seems that I have some ideas what could be wrong, tomorrow I'll try to check some cases which could be source of the problem. So stay tuned! :-) |
Sounds Great! Thank you for your time. I will look forward to hearing from you tomorrow. |
@wncappletech I'm tried to reproduce your error and seems that it could be specific to you project. Could you try to temporally remove the |
I was able to test that out in the console and successfully ran destroy on an item. I put permanent_records back and got the original error again. |
Any progress on this issue? |
Receiving an error when trying to call the delete method on an item.
Here is the definition in the controller
Any help or suggestions would be great. Thank.
The text was updated successfully, but these errors were encountered: