Sha256: 8cc728dcf45feec2ec5ac3900eb1a044ac97b63a48d0bfb28dc05c5c4462059e

Contents?: true

Size: 665 Bytes

Versions: 2

Compression:

Stored size: 665 Bytes

Contents

class TasksController < ApplicationController
  filter_parameter_logging :password

  def index
    @tasks = Task.find(:all)
    render :text => 'index'
  end

  def new
    render :nothing => true
  end

  def show
    @task = Task.find(params[:id])

    respond_to do |format|
      format.html { render :text => 'show' }
      format.xml  { render :xml => @task.to_xml }
    end
  end

  def destroy
    @task = Task.find(params[:id])
    @task.destroy

    flash[:notice]         = 'Task deleted.'
    session[:last_task_id] = 37

    respond_to do |format|
     format.html { redirect_to project_tasks_url(10) }
     format.xml  { head :ok }
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
remarkable_rails-3.0.0 spec/application/tasks_controller.rb
remarkable_rails-3.0.1 spec/application/tasks_controller.rb