similar to: foreign key support in mysql adapter

Displaying 20 results from an estimated 1100 matches similar to: "foreign key support in mysql adapter"

2006 Mar 22
2
Test Failure: <0.01> expected but was <0.01>
I have two database fields, and then I have a method which shows the difference. It''s simply def ev_diff ev_push - ev_fold end The value of ev_push is 0.26, value of ev_fold is 0.05, so the diff is obviously 0.01. I have an assertion written as: assert_equal 0.01, stats.ev_diff Which fails..but I have no clue why. The failure message follow: 1) Failure:
2007 Feb 13
3
"should.be_in [values]" and "each_should_satisfy"
Hi! I just started using RSpec and have some question that I couldn''t find answers to. If I have a result that can have two valid values, is there a better way of writing the following assertion? [value1,value2].should_include actual Is there a more elegant way of performing should_satisfy on a collection, for example I currently use something like collection.each {|x|
2006 Mar 01
5
single transaction migrations
Hi! It seems that migration doesn''t use single transcation to execute the needed migrations for the database upgrade, so if I have database at version 5, and I wrote some migrations 6..10, and error occurs while executing migration 7, the database stays in state 6? I also think that migration taks could use some more verbosity, for example if migration fails, there''s no
2007 Jul 19
1
stopping on first failure
Hi! Is there an option that I could provide to the spec runner that would make it stop after it encounters the first spec that fails? Esad
2007 Feb 20
1
having should_receive expectation for things that happen in setup
Hi! The following example doesn''t work for me: http://pastie.caboo.se/41732 However, if the call to msg() happens in the specify block after the expecation and not in the setup, it will pass. Why is this? I thought the setup method was there to actually ''construct'' the context and the specifications are some kind of "postconditions" that only need to be
2007 Apr 13
1
File.should be_exist?
Hi! Is there a nicer way of writing File.should be_exist(''filename'')? File.should exist(''foo'') throws NoMethodError in ''specification'' undefined method `exist'' for #<#<Class:0x3ec1c30>:0x3ebc308> (I''m using rspec from the trunk) Esad
2007 Apr 04
1
pontential bug in rspec_on_rails and ActiveRecord transactions
Hello rspec-users, I''ve encountered a strange bug in rspec, but it may be me who is wrong. I''m running latest version from the trunk (r1678) of both rspec and rspec_on_rails. Please consider the following model: class Url < ActiveRecord::Base def after_save Contact.create!(:primary_email => ''user at example.com'') raise
2011 Jun 11
1
Having a problem adding a foreign key
I keep getting this exception "SQLite3::SQLException: no such column: books.user_id: SELECT "books".* FROM "books" WHERE ("books".user_id = 4)" ,which sounds like there is no user_id in books table.So i just installed foreigner plugin and added " t.integer :user_id, :null => false" and "add_foreign_key(:books, :users)" in book
2006 May 08
4
rake db:migrate
Would it make sense for rake db:migrate to support creating databases if it is not found, with blessing from user to prevent typos, or as an additional command line switch. Or am I just being too lazy? -- Posted via http://www.ruby-forum.com/.
2006 Mar 07
1
decorators for models?
Hi! I''m thinking of implementing datagrid like functionality for showing data (models) in grids so that I don''t have to re-invent the view/controller for each table I need. There are number of parameters that need to be customizable: column titles, row style depending on the data (i.e. showing all rows with balance<0 in red), is column sortable, sort-algorithm etc. To
2006 May 11
1
rendering in after_filter
Hi! Is it possible to render the action within the after_filter method, or is the rendering performed before? I have something like this: class FooController after_filter :send def a @content=... end def b @content=.. end protected def send send_data(@content,...) end end However, when calling the action a or b, the @content doesn''t get sent, but instead
2006 Mar 21
1
including templates/views in plugins
Hi! I''m writing a datagrid plugin and would like to render the datagrid using a .rhtml template. However, I''d like to avoid placing this template in app/views/shared, but it should reside somewhere within vendor/plugins/datagrid/... Any ideas? -- Posted via http://www.ruby-forum.com/.
2009 Sep 28
5
Multi-databases support
Hi, While I was hacking ovirt-server, I have found that it's currently restricted to Postgres DB. Even if I like postgres for serious work on a server, I really prefer to hack/dev locally on a Sqlite or MySQL DB. I have googled on rails in order to find a good answer for the "foreign key problem" which forces OVirt to stay on pg. I have found a plugin on this particular
2007 Apr 17
7
rspec with CI
I am a bit of a rails and rspec noob. I am trying to use rspec in conjunction with CruiseControlrb. When I run a cruise build having spec errors, the build does not indicate a failure. I have tried to track down why this is the case, and my best guess is that the spec task is kicking off the spec via a ruby() method in rake, and that ruby method does not propagate my spec failure back to
2006 Jul 10
3
Can migrations set up foreign key references?
I use Oracle and i really want to use migrations, but there seems to be no way to setup foreign key constraints. Is this true? If it is then doesn''t that make migrations useles with Oracle? Thanks Chris -- Posted via http://www.ruby-forum.com/.
2006 Jan 18
3
Support for foreign keys in Migrations
Is there any work being done to add support for defining foreign keys in ActiveRecord Migrations? If not is it something that people would find useful or do most people here believe in the "Application Database" style over the "Integration Database" style [1] as defined by Fowler? I''d love to see support for foreign keys in Migrations. For selfish reasons
2013 Mar 11
0
Any interest in various features from "schema_plus" gem?
Hello (I''m new to this group so please pardon any inappropriateness), I''m a primary maintainer of the schema_plus gem<https://github.com/lomba/schema_plus/>, which adds some capabilities to rails'' schema definitions. The gem has been around for several years and is pretty reliable. I''ve been wondering whether there''d be interest in folding
2006 Apr 23
0
SOC project
Hello list, As you may probably know, Ruby Central is one of the organizations participating on the Google Summer of Code contest (http://code.google.com/soc/ruby/about.html), and I was thinking about applying with some rails-development projects? Is there anyone here thinking about doing the same as I that together we could build something more useful in the end. Greetings, Esad --
2006 May 07
1
rake test without database
Hi! Is it possible to run unit tests when no database is configured? Rails recipes mentions putting following piece of code in a file within lib/tasks/ [:test_units,:test_functional,:recent].each do |name| Rake::Task.lookup(name).prerequisites.clear end However this seem to be out-of-date, as task lookup in rake according to RDoc is now done using Rake:Task[name]. But after I updated the
2011 Nov 28
29
Lack of foreign-key constraints support in ActiveRecord
Is there any reason why AR has never supported foreign-key constraints? I can understand the lack of support for triggers and stored procedures since they are highly dependent on the database to create a wrap API around them. But this is not the case for foreign keys. This is specially important for open-source projects like Redmine/Chiliproject and Gitorious where you shouldn''t be