similar to: valdate_presnce_of email, :if => :validate_id + Factory girl

Displaying 20 results from an estimated 1000 matches similar to: "valdate_presnce_of email, :if => :validate_id + Factory girl"

2009 Oct 15
7
PLZ HELP - ROR on Redhat Linux :: Problem with backgroundrb
Hi, I have successfully crossed all the hurdles to install Ruby on rails on a redhat 5 Linux based system. But the last and the biggest hurdle i am facing at this moment is installing backgrounrb :( I followed all the steps from the http://backgroundrb.rubyforge.org/ 1. sudo gem install chronic packet 2. script/plugin install svn://rubyforge.org/var/svn/backgroundrb [IMP:::: I had to drop
2008 Apr 06
10
about the form_for ..
question one: is there any select box tag for form_for? now,perhaps i just can use the select or select_tag? question tow: i have a A model,it has one B such as: class A< ActiveRecord::Base belongs_to :B when i use the form_for tag,how can i output the variable name?like this: <%form_for :a,@a,:url=>{:controller=>"a",:action=>"save"} do |f|%>
2010 Aug 16
3
Load dummy data using Factory girl
Hello, I wanted to know how to load dummy data in the application using Factory girl. I had done this using Fixtures.I had made a fixtures folder into the test folder and run the command "rake test fixtures:load" Currently i tried using factories in the spec which is working fine. Wanted to know know regarding loading dummy data. -- Posted via http://www.ruby-forum.com/.
2013 Mar 28
0
Can not determine issue in my factories with factory girl in rspec
Hi Folks, I hope you''re doing good. Sorry for a long email. I am just trying my best to learn something new and, need your help to understand/ sort a small issue which I am not able to figure out. I have create couple of factories and created some examples for rspec for one of my projects. I have got everything working on my local. Even, my specs are green on local for both ruby
2012 Nov 12
1
Factory girl associations and rspec
Hi, I am trying to test factory girl associations basically I have a user model and status model , what is supposed to happen is a user has many statuses and a status belongs to a user. I have tried to model this in factory girl as you can see in the files. When I try to execute the test I get Failure/Error: visit("/users/#{user.id}/statuses/#{status.id}")
2010 Sep 01
1
Faking Paperclip has_attached_file with Factory girl?
Hello! I wonder if it''s possible to simulate Paperclip''s has_attached_file with Factory Girl and then test it with Rspec. I don''t get it to work. My factories.rb file looks like this: Factory.define :user do |user| user.name "Anders" user.email "user-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org" user.password
2008 Sep 09
2
form_for submit to a custom action
hi forum, I am new to rails, and i am just getting my hang of things. Problem, how do you pass content captured in a form to a custom method? I have the following form: <% form_for :message, @message, :url => { :action => ''reply''} do |f| %> <table cellpadding="4" cellspacing="5"> <tr> <td>Content:<%=
2009 Aug 18
7
** Removing all instances of mysql on mac osx **
I am trying to switch from sqllite3 to mysql on Ruby on Rails. Whenever I try to install the mysql gem, i get an error: *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. I cd''d into my usr/local/bin directory and saw i have several
2011 Jan 17
4
Factory Girl and attr_accessor with validation
I have a problem with a recent change to one of my models when created via Factory.create. class User < ActiveRecord::Base attr_accessor :tc_check validates :tc_check, :presence => true, :acceptance => true ... end The following definition fails, when calling Factory.create(:valid_user) Factory.define :valid_user, :class => User do |u| u.email
2009 Aug 26
5
Noob DRY method question
Hi Gurus, I''m learning the Rails framework, and I have this exact block of html/javascript in two places in an if/else construct in application.html.erb: <body onload="Modalbox.show(''<div class=\''warning\''> <p> <center> <%= flash[ :notice ] %> </center> </p> <p> <center> <input
2010 Aug 02
7
Persistent SSH sessions
Hi all I have an ADSL modem which reboots when there is a power cut and the inverter (UPS) kicks in. Internet access is down for a duration of 1 to 2 minutes while the modem boots. I have many SSH tunnels and shells active. Due to the default "TCPKeepAlive On" setting, these sessions are terminated almost immediately. I tried the following configuration: sshd_config on server:
2009 Aug 06
13
Redirect after login
Hi, I''m new to Ruby/RoR so please bare with me! I''m trying to adapt a ruby setup where someone logs in to a bonjour service via a web browser. I have the login screen which asks for host and password. There is only one user per host and i can log in fine. It''s suppose to redirect me to /list in my browser but doesn''t. Once i''ve entered the correct
2009 Nov 12
9
uninitialized constant XML::Document
Hi All, I have installed "libxml-ruby" gem on my ruby instllation. while trying to create xml document with ruby progam in Rad Rails am getting error like "uninitialized constant XML::Document (NameError)" do i need to config any thing else in environment.rb file Thanks in advance Chinna. -- Posted via http://www.ruby-forum.com/.
2009 Aug 06
6
initializers
I created a "config/initializers/tasks.rb" In it I have the following is all: logger.info("Running tasks") However nothing is logged or run. Am I missing something? -- Posted via http://www.ruby-forum.com/.
2014 May 22
3
Host OS, Storage Info
Hi, Is there any way to get host OS information and host Storage in formations using libvirt API...? Rgds -Sijo
2008 Oct 27
8
pagination in ajax
hi, I am curently using rails version 2.1.1. Currently i have done simple pagination using will_paginate plugin.it works.but when i am trying pagination using ajax with help of will_paginate plugin it wont works.i am also using RemoteLinkRenderer helper, but it gives an error uninitialized constant RemoteLinkRenderer. can anyone provide any tutorial or sample code so that i can
2006 Jan 23
3
prototype.js: enumerable mixin for hash broken
Hello everyone. I am not sure if this is the right place to post, please redirect me if there is a mailinglist more specifically dealing with prototype.js. After playing around with the very inspiring prototype library I have found a rather annoying thing, that makes the usefulness of the Enumerable mixin for Hashes questionable, if I am not totally wrong (again :-). Here an example:
2009 Sep 29
10
rails 2.3.3 upgrade shows error
You have a nil object when you didn''t expect it! You might have expected an instance of Array. The error occurred while evaluating nil.<< any ideas ? Application works fine with rails 2.1.0 Sandip -- Ruby on Rails Developer http://funonrails.wordpress.com www.joshsoftware.com http://brandpotion.com (Latest project released) --~--~---------~--~----~------------~-------~--~----~
2005 Jul 20
1
problem compiling with linux
Dear Jean-Marc Valin, I tried what you said, to complile just libspeex, as there was no "configure" file inside the folder "libspeex" I copied it from parent directory (I guess I am not wrong doing that), ya it configures well with the command # ./configure --enable-blackfin-asm --enable-fixed-point --host=bfin-uclinux but for the <make> command it is
2009 Oct 29
4
manipulating form
Hi, I work with forms and i won''t to set a name for a form to use javascript functions.. How can i do Thanks