search for: things_controller

Displaying 7 results from an estimated 7 matches for "things_controller".

2005 Dec 29
8
First module gives "unknown action"
Hi, I''m using "Agile Web Dev. w/Rails", which is great but has a minimum on grouping controllers into modules. I''ve successfully generated a module scaffold, so I have: app/controllers/admin_controller.rb app/controllers/admin/things_controller.rb (And the rest of the scaffold output, which seems normal.) However, browsing to http://localhost:3000/admin/things/ gives me "Unknown action No action responded to things". I''m not sure what or how much code I should post to illustrate the situation, or if this is some so...
2007 Oct 25
1
Mocking/Stubbing help with subdomain as account key
...with RSpec''s mocking and stubbing? Basically, I need to test that @current_person.things is getting the find message and returning @thing. I''ve tried stubbing and mocking @current_person.things a number of different ways with no luck. Here''s my latest attempt: # things_controller_spec.rb before do @request.host = "subdomain.test.host" @thing = mock_model(Thing) @current_person = mock("person") # <= THE MOCKS IN QUESTION @current_person.stub!(:things).and_return(Thing) @current_person.things.stub!(:find).and_return(@thing) end def...
2007 Jun 09
11
authentication, controller specs. I think I''m missing something simple ....
...alJumpError issue tho since I''m sure it will be a use-case that crops up in my application. The basic issue I''m struggling with is how does define mocks/stubs for a controller method that does something of the form: method_a.method_b.find Pasted code/spec/errors here * things_controller http://pastie.caboo.se/69136 * things_controller_spec http://pastie.caboo.se/69137 * Errors w/ find(:all) http://pastie.caboo.se/69138 -- Rick rick.tessner at gmail.com
2007 Feb 09
2
Re: customizing map.resources for REST
Yeah... I''m totally struggling to grok resource routes too... seems like they''ve totally blown the beautiful simplicity of the old url pattern stuff out of the water. Would love to hear an answer to this question!!! b Andy Triboletti wrote: > I want to customize map.resources so it uses a uid in the URL instead > of the database id. The uid is a field on my object.
2007 Dec 29
5
./script/story command
Below I''ve pasted a ./script/story command I''ve been using for about a week. It has three modes of operation: 1. ./script/story with no arguments will run all *.story files in the story path 2. ./script/story with a path or glob will run the specified stories 3. If input is passed in via STDIN, it runs that text as a story. This opens up story running via a simple interface
2007 Oct 26
3
Selecting a database from the application itself?
Hi everybody, I just started thinking about a project and am seeking some help regarding its design. The idea would be to create labels (i.e. address labels).I could let users type the text manually, but I dont think they would appreciate that when they''ll want to print 5000 addresses. I can also probably let them import csv files, that should not be a problem, but playing with those
2009 Apr 10
0
ActiveRecord belongs_to ActiveResource
class Thing < ActiveRecord::Base belongs_to :other_thing end class OtherThing < ActiveResource::Base self.site = ... end The association here works. I can access other_thing from thing with no problems until, as usual, testing. Specifically functionally test the things_controller. The things controller is simple scaffold, however, having the association to an active resource model causes functional tests to error because they don''t make the required request to the resource, dispite using the ActiveRecord::HttpMock... mechanism in the functional test. So I have thr...