12345678910111213141516171819 |
- class LogsController < ApplicationController
- before_filter :load_agent
- def index
- @logs = @agent.logs.all
- render :action => :index, :layout => false
- end
- def clear
- @agent.delete_logs!
- index
- end
- protected
- def load_agent
- @agent = current_user.agents.find(params[:agent_id])
- end
- end
|