similar to: Object/Record foreign key IDs set to zero

Displaying 20 results from an estimated 1000 matches similar to: "Object/Record foreign key IDs set to zero"

2011 Jan 15
3
respond_with javascript
My ajax stopped working when I switched to using respond_with. For my Votes, I have the create action and the corresponding create.js.erb, and respond_to :html, :js, :xml in the controller. Heres the log when I try and create a vote: Started POST "/stories/3-asdfasdf1111/votes" for 127.0.0.1 at Fri Jan 14 20:46:36 -0800 2011 Processing by VotesController#create as */* Parameters:
2005 Sep 06
6
strange behavior of acts_as_taggable
I was testing my models with this new library and I got: >> s.tag "warp" ActiveRecord::StatementInvalid: ERROR: inserción o actualización en la tabla «tags_stories» viola la llave foránea «tags_stories_story_id_fkey» DETAIL: La llave (story_id)=(8) no está presente en la tabla «stories». : INSERT INTO tags_stories ("tag_id", "story_id") VALUES
2002 Sep 07
1
rcopy.pl an Perl script for rsync (with XML config)
Hello all, I have been working on a Perl script called "rcopy.pl" that basically allows you to configure rsync via an XML file. It's very easy to use. And it's very usable at this point. FEATURES: * allows you to create your own set of rules to backup a system (synchronize) -- a la 'rdist' * you can have multiple servers and user accounts for different sources in one
2010 Jun 29
16
problem finding find current page
I have this bit of code in my email.controller user = @current_user story = @current_story recipient = story.user It doesn''t work because @current_story isn''t defined. How can I find the current page to make this work? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
2008 Jan 23
11
Rails 2.0.2 + RJS
Hi I had ajax commenting on my app, which worked perfectly on Rails v1.2.6, but does not work the same in Rails 2.02. Basically the comment gets added, but the visual effects do not work (ie lines 2 + 3 of create.rjs) create.js page.insert_html :bottom, ''comments'', :partial => ''comment'' page.visual_effect :appear, "comment_#{@comment.id}"
2009 Jul 21
2
Machinist - having problems stubbing an after_create filter
Hi all I''m moving to using Machinist in my rspec tests and am having a problem with an after_create callback method that i need to stub out. It seems like calling ClassName.make will trigger this callback before i''ve had the chance to stub it. Can i stub it in my blueprint for that class? Or, can i stub the method for all instances of the class before i call ClassName.make?
2010 Jan 29
4
requiring records in the DB before testing
Is there any way I can require a small set of data be in the test database before any tests are run? (unit, functional, integration, cucumber, etc) Any way besides using fixtures, that is. Overload a rake task? Modify test_helper? Any ideas? (Simple Case: I have to have a minimal set of user roles defined before any users can be created) -- You received this message because you are subscribed to
2010 Dec 12
5
Fixtures and unit tests - no such file to load
Hello all, I''m having some issues with my test fixtures and unit tests and am hoping somebody has an idea about how to fix it. Background: I have a table in my legacy database called tp_approval_step. For this table I have a fixture called tp_approval_step.yml I have a model called ApprovalProcessStep that uses set_table_name ''tp_approval_step'' In my test file,
2010 Jun 03
2
creating fixtures for has_many :through
I''m stymied at how to create a fixture that establishes a has_many :through relationship. I''ve watched the railscast at: http://media.railscasts.com/videos/081_fixtures_in_rails_2.mov ... but that''s for HABTM relationships. I''ve read: http://www.ruby-forum.com/topic/145676 but that ultimately doesn''t answer any question. So with no further ado:
2010 Feb 01
3
validating both sides of a has_one relationship breaks pickle/machinist tests
A lot has been posted about validation issues with associations, however, I don''t see this issue addressed specifically. ex: class Foo has_one :schedule, :dependent => :destroy validates_presence_of :schedule class Schedule belongs_to :foo validates_presence_of :foo_id this creates a circular dependency that breaks test frameworks like pickle and machinist. At first I was
2009 Sep 01
13
Function Testing Reloading Fixtures before assertion
Hey Everyone, I have a function test the is failing (despite the fact the function actually works in the application). I was looking for some debug advice on how to find my problem. Here is the test: def test_should_delete_word assert_equal ''published'', words(:one).status debugger delete :destroy, :id => words(:one).to_param assert_equal
2006 Feb 10
2
Sudden Strange Webrick Error: Errno::ECONNABORTED
Hello, I''ve been developing an application (on Windows), and everything was going pretty well, but I suddenly began getting this weird error back from Webrick after submitting something through ajax, and only through ajax. I''m submitting a form through ajax, and it is being process properly - with all the interaction with the database happening without problem. The response
2010 Jul 28
5
db:fixures:load does not call Model.save()
Hello, $ ruby script/generate model balance plus:integer minus:integer equal:integer $ cat app/models/balance.rb class Balance < ActiveRecord::Base def save self.equal = self.plus - self.minus super end end $ cat test/fixtures/balances.yml _10-1: plus: 10 minus: 1 $ rake db:fixtures:load $ sqlite3 db/development.sqlite3 sqlite> select * from balances; //=>
2009 Jul 20
9
rake error
When I run rake test:units I get this error: 292 tests, 350 assertions, 2 failures, 13 errors rake aborted! Command failed with status (1): [/usr/local/bin/ruby -I"lib:test" "/ usr/loc...] This error just showed up yesterday --- I have no idea how I caused it. Here is my gem list in case that helps: actionmailer (2.3.2, 2.2.2) actionpack (2.3.2, 2.2.2) activerecord (2.3.2, 2.2.2)
2007 Apr 13
0
mixin behavior
Hi, all, I need to DRY up some code in a few models. My first inclination, having come from the Java world, was to go with an abstract class. After a bit of reading, I then decided to follow the mixin route instead. Now I''m running into trouble, most likely from a few basic misunderstandings. There are three models I will be using to average and count rating data by executing a
2002 Sep 30
0
End Chinese Censorship at Yahoo!
Dear Friends, I read in a September 2002 edition of the Economist Magazine that Yahoo! (www.yahoo.com) has signed an agreement with the Chinese government to censor searches on their web site for consumers in China. I am very disappointed in Yahoo! and hope you are too. To let my distaste be known, I am writing Yahoo! and closing my email accounts and un-subscribing from Yahoo!-based mailing
2009 Dec 22
1
Rails fixtures - defining a table name?
Hi, At the minute all my fixtures have the same name as the table that they are intended for, because of a recent issue with rails it doesn''t seem possible to have a fixture beginning with the word ''test'' Does anyone know of a way to have a different fixture name and then map it to the correct table? Thanks -- Posted via http://www.ruby-forum.com/. -- You received
2009 Jul 11
3
Migration in Multiple Database
hello to all I been working on this from past few days. .I am talking about separate migration for each one of the multiple database that a single rails application has connection with.I know that rails can work with multiple databases but what with migrations for e.g my main rails application has a connection to two databases 1> main_development 2> secondary_development Know suppose i
2009 Jul 21
1
[RAILS] - 2.3.3 creating a sea of red
hello, I''ve already asked via Rails channels on this and have received no response, so I''m asking here in hopes someone has run into something similar. I updated to rails 2.3.3 yesterday, and now all of my specs are failing with the following error: Fixture::FormatError in ''PublishedGallery Methods#thumbnail should delegate to its lead asset'' a YAML error
2011 Feb 07
9
Best way to populate development database
What would be the best way to populate a development database for a Rails 3 app? I have looked at faker, but it seems that development has stopped, any other options? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To