Change clear channel to not do a find-all before deleting feeds.

This commit is contained in:
Alan Bradburne
2012-02-23 11:35:34 +00:00
parent 4f0354303f
commit 94b73faf85
2 changed files with 7 additions and 2 deletions

View File

@ -38,7 +38,7 @@ class ChannelsController < ApplicationController
# clear all data from a channel
def clear
channel = current_user.channels.find(params[:id])
channel.feeds.delete_all
channel.delete_feeds
channel.update_attribute(:last_entry_id, nil)
redirect_to channels_path