gist: 3651 Download_button fork
public
Public Clone URL: git://gist.github.com/3651.git
report_controller
1
2
3
4
5
6
class Surveys::ReportController < ApplicationController
  def show
    Survey.find()
  end
end
 
report_controller_spec
1
2
3
4
5
6
7
8
9
require File.dirname(__FILE__) + '/../../spec_helper'
 
describe Surveys::ReportController do
  it "should description" do
    Survey.should_receive(:find)
    get :show, "survey_id" => 1
  end
end
 
routes
1
2
3
4
5
6
ActionController::Routing::Routes.draw do |map|
  map.resources :surveys do |surveys|
    surveys.resource :report, :controller => "surveys/report"
  end
end
 

Owner

zdennis

Revisions

  • 71752a zdennis <> Fri Aug 01 10:52:29 -0700 2008