Sha256: a15d75e9f8799773dd72ec9755ced5a2630fdd276adf21d09a29f17ca81bba84

Contents?: true

Size: 792 Bytes

Versions: 8

Compression:

Stored size: 792 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])

    # Multiple expects
    Task.count
    Task.max
    Task.min

    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.title(false).inspect} was removed"
    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

8 entries across 8 versions & 1 rubygems

Version Path
remarkable_rails-3.1.7 spec/application/tasks_controller.rb
remarkable_rails-3.1.8 spec/application/tasks_controller.rb
remarkable_rails-3.1.1 spec/application/tasks_controller.rb
remarkable_rails-3.1.3 spec/application/tasks_controller.rb
remarkable_rails-3.1.2 spec/application/tasks_controller.rb
remarkable_rails-3.1.4 spec/application/tasks_controller.rb
remarkable_rails-3.1.6 spec/application/tasks_controller.rb
remarkable_rails-3.1.5 spec/application/tasks_controller.rb