similar to: avoiding repitition

Displaying 20 results from an estimated 3000 matches similar to: "avoiding repitition"

2007 Jun 15
3
dynamic specs
I''d like to test that my model attributes are properly protected against mass assignment, something like: it "should NOT update :balance on mass assignment" do @account.attributes = {:balance => 1000} @account.balance.should_not == 1000 end instead of doing each attribute manually however, I''d like to automate it so I can pass a list of attributes which CAN be
2003 Jun 12
1
bootstrap question
Dear r People I have a bootstrap question, please. (this may possibly be a problem with my understanding of the bootstrap) Suppose I have a sample of size 15, x[1], ...x[15]. This is a sample which is small compared to the population. by the way, the x[i] are iid and have a common distribution F. As I understand the bootstrap, that function will take a user specified number of repititions.
2007 Mar 24
1
spec''ing metaprograming & rails CRUD
For edge rails there is a Crud generator. There is also a CRUD controller that is out there from which you can inherit your other controllers (see http://geekonomics.blogspot.com/2006/07/crud-and- shared-controllers.html) This got me thinking about Crud controllers in general. As far as I know, the generator can''t produce crud classes which are nested (i.e.
2007 Mar 24
0
Using spec fixtures with integration tests
Hi all, How can I use spec fixtures with rails integration tests ? I''ve tried adding {{ fixtures "../../spec/fixtures/myfixture" }} to the integration test but the fixtures are not loaded when I run the rake task. Rails doesn''t load symlinked fixtures either so I copied the files from spec/fixtures for the time being. Not very DRY. Any ideas ? Keith
2006 Nov 04
0
How do CRUD and REST work for a wizard-style application?
I''m rewriting an application with the intention to use the elegant CRUD and REST design principles as outlined by DHH in his RailsConf Keynote[1]. The question is: how do you use those principles for an application that is of a sequential nature? The application works much like an MS Windows wizard: user begins at screen foo. After doing (or not) some stuff in screen foo, he is taken to
2010 Apr 06
2
respecting original matrix dimensions
Hi All, I'm hoping someone else can help me out with this. I am doing some matrix algebra using sub-parts of matrices, and sometimes I need only a single row/column of the original matrix. However, whenever I pull out only a single row/column, R returns a row vector, but often this will break my matrix algebra. Is there any *easy* way to get R to remember what the single row/column came out
2006 Aug 02
1
Use Non CRUD with Simply RESTful
Hey guys, I''m trying out the new RESTful bits in Edge Rails, and am having a bit of trouble wrapping my brain around certain things. For instance, say I have a page that is separated into sections with tabs at the top. I want to replace divs on the page with RJS. Now typically before I''d have a method on the controller that rendered an RJS template to accomplish this.
2006 Jul 28
8
Building a Search Page as part of CRUD
I''ve been experimenting with Rails over the past couple of days and have come across something that seems harder than it should be. In previous frameworks I have used (WebObjects, php) a full search page (which leads into a list view populated with search results) was part of the CRUD that was either dynamically or statically created after specifying table/object schema. In
2006 Feb 08
0
Fixture access question
Hi, I want to add the basic model record create tests for my rails app as in the "Agile Web Development with Rails" example: i.e. (header stuff and boring repitition missed) def test_create assert_kind_of Requirement, requirements(:requirement_1) assert_equal <at>requirements["requirement_1"]["name"], requirements(:requirement_1).name end Now I''m
2006 Jul 27
0
CRUD, REST and associations
Let''s say I have the model class Reader and Magazine, connected by join model Subscription. It looks something like this class Reader < ActiveRecord::Base has_many :subscriptions, :dependent => :delete_all has_many :magazines, :through => :subscriptions validates_presence_of :name end class Magazine < ActiveRecord::Base has_many :subscriptions, :dependent =>
2006 Mar 03
2
newbie scaffold question
I''ve got a database with several tables. I''d like to create scaffolding for separate CRUD interfaces for several of these tables. I''m hoping that the scaffold generator can create the CRUD code for all these tables in ONE controller, but I don''t know how to tell it to do that, if it can. Can anyone verify if this is possible? Thanks, David -- Posted via
2006 Jan 17
0
asterisk.ctl limitations
Hi I wrote a small patch to netcat to work with unix domain sockets to enable me to communicate with an asterisk daemon through the unix-domain socket /var/run/asterisk/asterisk.ctl . Only then I noticed that reading the code is done very differently than a typical network protocol: it expects every command in a separate read. Basically I used the following filter to pipe commands from the
2007 Mar 19
3
controller_name with dynamic controllers
I''m writing a controller which should only be inherited from, something like the generic crud controller seen here: http:// geekonomics.blogspot.com/2006/07/crud-and-shared-controllers.html Now, in my spec, I would like to create a controller which inherits from the generic CRUDController, without actually creating the controller. This controller is *only* for testing. How can I
2008 May 09
1
Test Unit can't change data
I have converted my engine from myISAM to InnoDB, the matter now in Test Unit, the table cant do any changes for CRUD. Any advice? But if I convert it back, the CRUD can run very smooth and data value in attributes changed. Reinhart http://teapoci.blogspot.com -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you
2002 Jul 22
1
Samba 2.2.4 - files have disappeared!
Hello all. I have two linux machines, Red Hat 7.1 with kernel 2.4.9-34 (Red Hat stock), with Samba 2.2.4 installed. Both of these machines usa Samba to mount several shares from a common Windows 2000 server. These machines also run Courier IMAP. For those not familiar with email systems, Courier uses the "Maildir" method of email storage and retrieval; each message is stored as a
2006 Jul 31
3
Simply_RESTful and Bulk Import URLs
Hi, I have a people controller, and want to import bulk import multiple people from a CSV file. In my routes.rb file I have: map.resource :person Now, it''s a little unclear to me how to further configure the routes to allow me to add the following URLs: I need a URL to choose a file to upload, so I need an HTML ''frontend'' for it, so I figured the following URL
2000 May 02
0
patch for .samba-2.0.7/source/lib/bitmap.c
Dear all, I have made patch for samba-2.0.7/source/lib/bitmap.c With this patch 1) constant '32' is now named. 2) make only one malloc on bitmap_allocate(). ( This will make bitmap to fit within same page, which will cause lesser pagefault, I wish ) 3) totally changed bitmap_find(). I guess this should work faster then testing each bits one-by-one. ---
2006 Jan 08
9
URL/Site structure
Greetings, I''m fairly noob with rails and making my first DB driven site with it. I''m using the scaffold generator to develop the admin side of my site (admin_controller) I have three sections that I want to have the administrator edit, and I want to call these from the admin controller that has a layout with navigation to these three sections. When using the scaffold
2010 Jul 04
3
Generated By handling CRUD Scaffold
Good afternoon. I have two questions: First question: Can be defined at the time that I''m generating the scaffold the size of a string? For example name:string (50)? Second question: I wonder how to proceed correctly to include new fields starting at a CRUD generated by scaffold. Example: First step (I use): script/generate scaffold User name:string login:string Second step (I add
2006 Aug 14
1
Testing CRUD/Rest Controllers
I have a few simple controllers doing plain, simple crud in a standard way. now it''s not very DRY to write a funtcional test for each controller, since they are all doing the same (apart from a few variable names, but that could be easily inflected or so). is there a way to do this? e.g. does inheritance work with tests, so i define a base test first, inherit my other tests and add a few