I’m trying to delete an account but at the same time i’d like to
delete the portals that belongs to the account.
This is what i wrote but it’s not working.
how can i deal with this problem?
I have this code inside the account controller in the “destroy” method
@account = Account.find(params[:id])
@portal = Portal.find(:all, :conditions => [‘account_id = ?’,
the error displays this:
NoMethodError in AccountsController#destroy
destroy' for #<Array:0x47982a0> app/controllers/accounts_controller.rb:78:indestroy’