I have a project that is having some issues in clearing cache files in
any environment that allows for data caching.
This is the error that I am getting:
ArgumentError in Admin/pagesController#destroy
wrong number of arguments (1 for 0)
RAILS_ROOT: /Users/chris/Documents/Projects/Rails/app
Application Trace | Framework Trace | Full Trace
/Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/active_record/observer.rb:157:in
after_destroy' /Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/active_record/observer.rb:157:in
send’
/Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/active_record/observer.rb:157:in
update' /Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/active_record/callbacks.rb:338:in
notify’
/Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/active_record/callbacks.rb:302:in
callback' /Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/active_record/callbacks.rb:296:in
destroy_without_transactions’
/Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/active_record/transactions.rb:104:in
destroy' /Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/database_statements.rb:66:in
transaction’
/Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/active_record/transactions.rb:80:in
transaction' /Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/active_record/transactions.rb:100:in
transaction’
/Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/active_record/transactions.rb:104:in
destroy' app/controllers/admin/pages_controller.rb:41:in
destroy’
=================
Here is my controller code:
class Admin::PagesController < ApplicationController
before_filter :login_required_for_staff_member, :find_account
layout “admin”
def destroy
@page = @account.pages.find(params[:id])
if @page.destroy
flash[:success] = “The page was deleted”
redirect_to admin_pages_url
else
render :action => “index”
end
end
Any ideas?
Thanks for the help.