similar to: Testing Validations in Rails

Displaying 20 results from an estimated 100000 matches similar to: "Testing Validations in Rails"

2006 Jul 31
2
Testing the flash.now
What''s the best way to test the flash when you use flash#now ? For example, if I set the flash in my controller: flash.now[:notice] = ''This will only show up on this action.'' How do I test it? Normally I would do: assert_equal ''This will only show up on this action.'', flash[:notice] But this doesn''t seem to work with flash.now. Any
2006 Apr 17
7
MySQL backticks and column names
The upgrade to Rails 1.1 hurt my ability to run tests because it generated the following MySQL error: Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''key ON config (key)'' at line 1: CREATE UNIQUE INDEX key ON config (key) I have a table called `config` with a column
2006 May 01
17
Radiant CMS
I am pleased to announce that Radiant CMS is now publically available from the Subversion repository at: http://radiantcms.org/ What is Radiant? ---------------- Radiant is a no-fluff, open source content management system designed for small teams. It is similar to Textpattern or MovableType, but is a general purpose content management system (not a blogging engine). Radiant features:
2006 May 01
1
Radius 0.0.1 -- Powerful Tag-Based Templates
I am pleased to announce the immediate release of Radius 0.5.0. Radius is a small, but powerful tag-based template language for Ruby inspired by the template languages used in MovableType <www.movabletype.org> and TextPattern <www.textpattern.com>. It uses tags similar to XML, but can be used to generate any form of plain text (HTML, e-mail, etc...). This release is much more feature
2007 Oct 16
10
Scenarios Plugin Pre-Announcement
This is sort of a pre-announcement for a Rails plugin my friend Adam Williams and I are working on. We''re in the process of extracting it from a project we are working on so that it can be generally useful to the Rails community. We are calling it "Scenarios". It is a drop in replacement for Rails fixtures: http://faithfulcode.rubyforge.org/svn/plugins/trunk/scenarios/README
2006 Apr 25
3
Creating your own generators
So I''m interested in creating an application specific generator. The script/generate command tells me that all I have to do is put a generator in my rails_root/generators: > 2. Unzip to directory /Users/{username}/.rails/generators/login > to use the generator with all your Rails apps > or to {app_root}/generators/login > to use with this app only. So I
2006 Jun 18
1
plugings for date validations, email address validation & url validations in rails
Hi all, Is there any standard plugin available for date validations, email address validation & url validations in rails? Thanks in advance, Medha. -- If not you then who..... If not now then when...... ----------------------------------------------------- With Best Regards, Medha. -------------- next part -------------- An HTML attachment was scrubbed... URL:
2011 Jul 28
2
RSpec, shoulda-matchers and Rails model attributes validations
I was trying out RSpec framework in a project and got stopped doing the unit test of a model. In particular, doing the test for the associations and the ActiveRecord validations. I started writing the validations but my tests didn''t look DRY at all. Before refactoring the tests checked out and look for other people solutions. I found out shoulda-matchers and Shoulda (which if I
2007 Apr 20
0
Rails validations, how to improve them
Here is a discussion of a problem and potential solution for Rails validations. Rails has a fundamental problem with validations in that it essentially requires you to either 1. Accept the default error messages (which can often lead to ugly and unfriendly messages for the user) 2. Override validation messages at the model level like so validates_uniqueness_of :field, :message =>
2010 Apr 14
1
Rails validations app specific problems
Hi all, I have a unique workflow where it''s making the use of validations difficult. My app is for internal use in my company and I have a funky implementation (inspired by the e-commerce Railscasts episodes) of a cart. I have products which when I "add to cart" creates an order with a state of "incomplete". The product is a line item of my order. Hope that makes
2006 Jun 12
0
Rails Testing Strategies
As part of an application I am developing, I have been delving into the dark art of Rails testing. Since the existing literature on the topic is a bit sparse, I have written up a couple of brief articles on testing strategies for rails. The first one is on the usefulness of ''Positive and Negative Controls'', and the other is a simple way to make sure you are working with
2006 Nov 04
0
Ruby Site Launched
We just launched the new Ruby Site: http://ruby-lang.org A full write up here: http://www.ruby-lang.org/en/news/2006/09/12/site-launch-at-last/ Digg it: http://digg.com/programming/Redesigned_Ruby_Site_Launched Kudos to everyone involved! -- John Long http://wiseheartdesign.com http://radiantcms.org
2006 Jan 04
1
[SOLVED] Am I going too far or Rails is just confusing?
On 1/4/06, John Indra <ji.milist@gmail.com> wrote: > However, it doesn''t work for me. Following your article, I change my I have found the source of the problem. I follow the solution provided by http://blog.teksol.info/articles/2006/01/03/belongs_to-user-interface-take-ii It''s a nice solution, however it contains typo :) There is indeed no error_messages_on method,
2007 Oct 21
18
plain text stories
Thanks to discussions on this list, suggestions from many of you and a patch from Pat Maddox, we now have Plain Text User Stories in Story Runner. Read more: http://blog.davidchelimsky.net/articles/2007/10/21/story-runner-in-plain-english Cheers, David
2006 Jul 02
0
Rails Core Weekly June 19 - July 2 2006
This is another edition of Rails Core Weekly, affectionately known as RCW. A much nicer pre-web 3.0 version is available from the following url : http://www.pinupgeek.com/articles/category/rails-core-weekly-news We have an Atom/RSS feed available there as well. Rails Core Weekly summarizes the rails-core mailing list, a list dedicated to Ruby on Rails internals and its development. RCW is
2006 Jan 20
11
Userstamp Plugin
I''m pleased to announce a new plugin for Rails: Userstamp. You can read my blog post at http://www.delynnberry.com/articles/2006/01/20/userstamp-plugin and/or read all about it at the perminant page http://www.delynnberry.com/pages/userstamp. Any comments or suggestions for improvement are much appreciated. -- DeLynn Berry delynn@gmail.com http://www.delynnberry.com A dump of the Readme
2018 Aug 29
0
TPM
On Wed, 29 Aug 2018 at 11:58, Dag Nygren <dag at newtech.fi> wrote: > On onsdag 29 augusti 2018 kl. 17:39:18 EEST Stephen John Smoogen wrote: > > On Wed, 29 Aug 2018 at 10:25, Dag Nygren <dag at newtech.fi> wrote: > > > > Anyone here with an experience in transitioning QEMU -> XEN ? > > >
2006 Jan 13
0
Saving ActiveRecord objects that are composed of other objects
I''ve got two pretty simple model objects Page and PagePart. Page has_many PageParts and PageParts belong_to Pages. When updating PageParts for a specific Page I''d like to be able to do: page.parts[x].content = ''changed'' page.save and expect that should the validation pass the changed page part would be saved as well, but this doesn''t seem to
2005 Apr 10
0
Chicago Area Ruby Group Meetup with DHH
The Chicago Area Ruby Group would like to extend a warm invitation to Ruby developers everywhere to a meetup with David Heinemeier Hansson on Saturday, April 23rd. We will start out at a Giordano''s Pizzeria downtown and afterwards move to a conference room provided by the kind folks at Site 9. The topic will most likely be Ruby on Rails and I am sure we will probably talk about
2006 Mar 01
5
validations without AR - going crazy trying to find link
Hi, in the past few months someone posted an entry on their blog about how to do validations in non-AR classes and I cant find it any more. Anyone have a link? Thanks, Trevor -- Trevor Squires http://somethinglearned.com