similar to: Database schema question

Displaying 20 results from an estimated 2000 matches similar to: "Database schema question"

2007 May 04
2
Custom Matcher and NAME NOT GENERATED annoyance
Hello RSpec users, Have been using RSpec since 0.8.2 (not too long ago, I must say). and been creating my custom matchers since was defined as "good practice". Also, auto-generated names for the examples is very helpful, I''m trying to take advantage of it. Since I often prior code/define all the "examples", I have created a few matchers to fulfill associations and
2004 Aug 30
3
Observations
Hi, we have a 2 node / 3 node RAC installation with OCFS. We have the following observations. 1. TIME STAMP Issue We have noticed that the time stamp which is shown on the datafiles doesnt remain the same even after a shutdown normal /shutdown immediate i.e If I shutdown all RAC instances ( A , B , C) using shutdown normal / immediate, the timestamp on the datafiles are not the same. Even
2006 May 24
4
AR foreign key problem.
Hello Railslist, (I''m using RadRails 0.6.3 on Windows XP with Ruby 1.8.4, Rails 1.1 and SQLite3) I have two tables in the database: "locations" and "customers": customers.sql --- id INT PRIMARY KEY name VARCHAR 255 address VARCHAR 255 postal_code VARCHAR 255 city VARCHAR 255 --- locations.sql --- id INT PRIMARY KEY postal_code TEXT longitude FLOAT latitude FLOAT
2007 May 05
4
autogenerated it (was ''Custom Matcher and NAME NOT GENERATED annoyance'')
> On 5/5/07, Luis Lavena <luislavena at gmail.com> wrote: > > describe "A User (in general)" do > > before(:each) do > > @user = User.new > > end > > > > it { @user.should have_many(:contest_public_votes) } > > it { @user.should have_many(:design_industry_user_interests) } > > it { @user.should
2004 Sep 17
9
Asterisk forum created
I saw several threads requesting an Asterisk forum to complement the email list. i.e. http://lists.digium.com/pipermail/asterisk-dev/2004-February/003103.html I recently created an Asterisk forum within TMC's popular VoIP forums for everyone to use. http://voip-forum.tmcnet.com/voip-forum/forum/forum_topics.asp?FID=15
2011 Mar 01
11
Did rails or shoulda go insane on the inflection of 'taxes'?
I have a model ''xp_jurisdiction_taxes'' which rails (3) created correctly. Another model ''xp_jurisdiction_states'' has many :xp_jurisdiction_taxes. In my spec I am using a shoulda helper to test the association but get the following error. BTW, greped the whole project just in case and the string ''taxi'' exists nowhere. 1)
2009 Jun 27
6
User has many topics or subtopics
Hi, So i have users in the system and i have topics. Topics also have_many subtopics. What is the cleanest way to setup the AR relationships if a user can either have_many topics or subtopics ? Its basically a dual select box dropdown, where the second dropdown is optional. Is the best to have user_topics, and user_subtopics tables and manage that way ? or combine into one table with STI
2007 Oct 19
11
Patch idea for rspec_on_rails
I recently wrote a matcher for testing AR associations which allows you to specify things like: Foo.should have_many(:bars).through(:bazes) I''m pretty darned proud of it and a couple of people have suggested that I should submit it to the rspec_on_rails project. Before I go to the trouble of writing out rdoc and fully spec''ing it, I just wanted to make sure this was
2007 Mar 29
21
a better "should have valid associations"
This is pretty much the same as last time around, if you recall. Thanks to Wilson for converting to the new form. I''ve added a few lines. Basically, it iterates over your model associations and does two things. - First, just try to call the association. Usually fixes speeling erors or other such silliness. - Second, try to find a record with an :include on the association. This
2010 Jul 26
3
Vmware to KVM - possible?
Is it possible to convert a VMWare image to KVM? As I have been building a few test machines on Vmware Fusion and would like to migrate some to a KVM server. Thanks in advance. Matt Keating Linux System Admin ? Dennis Interactive 30 Cleveland St, London, W1T 4JD Tel: 020 7907 6823 (direct line)? Fax: 020 7907 6600 (fax)? P Please consider the environment before printing this e-mail NOTE: The
2012 Aug 17
3
Rails doesn't validate create_model or build_model (has_one association)
I''ve got User has_one Shop. Rails is not validating when I tried create_shop or build_shop, neither in the browser nor the rails console. My code: class Shop < ActiveRecord::Base attr_protected :user_id belongs_to :user validates_presence_of :name, :primary_address, :city, :country_code, :currency end class ShopsController < ApplicationController before_filter
2007 Aug 01
1
Problem to remove loops in a routine
Dear R-users, I have written the following code to generate some trellis plots. It works perfectly fine except that it is quite slow when it is apply to my typical datasets (over several thousands of lines). I believe the problem comes from the loops I am using to subset my data.frame. I read in the archives that the tapply function is often more efficient than a loop in R. Unfortunately ,
2012 Jul 09
10
attr_accessible on some properties + attr_protected on others makes class 'open-by-default'
(I posted this as a bug in GitHub (https://github.com/rails/rails/issues/7018), but then someone there told me I should post it here, so here it is.) If you set attr_accessible on some properties in an ActiveRecord-descended class, and then attr_protected on others - the class becomes ''default-open'' - if any properties are missed or added later, they will be accessible by
2007 Oct 16
12
Example for attr_accessible?
Is anyone out there writing specs to check attr_accessible fields? I had originally written my spec to check for allowing the desired fields, and then none of the other regular db fields. Unfortunately this isn''t satisfactory, because attr_protected could have been used instead, which of course wouldn''t prevent mass assignment to any whatever=(val) method. I''m thinking
2011 Jun 30
8
Error of DEPRECATION WARNING
Hi, I Have a strange error when i type the command "rake db:migrate " Can you help to solve this error or give me some advices the error is: DEPRECATION WARNING: Rake tasks in /home/joanne/Desktop/picto/vendor/ plugins/prawnto/tasks/prawnto_tasks.rake are deprecated. Use lib/tasks instead. (called from <top (required)> at /home/joanne/Desktop/picto/ Rakefile:7) thanks for help
2007 Jan 24
2
attr_accessor vs attr_accessible
Please guide me how to use those two methods. I can''t differentiate them. I was doing something on my model and I have put one field in the attr_accessible method. After that when I try to run the app the app always says my other fields are blank, but they''re all filled up. What''s wrong with it? Thanks --~--~---------~--~----~------------~-------~--~----~ You received
2010 May 05
6
Benchmark Disk IO
What is the best way to benchmark disk IO? I'm looking to move one of my servers, which is rather IO intense. But not without first benchmarking the current and new disk array, To make sure this isn't a full waste of time. thanks
2006 Jan 12
9
Scaffold shows all attributes altough I use attr_accessible!
Hi all I have a Model like this: class Member < ActiveRecord::Base attr_accessible :username, :email, :first_name, :last_name end I have created a scaffold using script/generate scaffold member members Using the URL localhost:3000/members/edit/1 I can edit all attributes, including created_at, lock_version etc.! But it should only show the attributes I listed in attr_accessible! What
2008 Nov 01
2
stuck on a validates_presence_of unless issue
i have a person object. Persons don''t need to have addresses, but if they have any address field value, they must have them all. So I have something like this: validates_presence_of :street_address, :city, :state, :postal_code unless :address_blank? address_blank? checks whether all of the address fields are blank. If I run a test like this, it works: describe "given
2010 Nov 02
7
Testing attr_accessible (and/or attr_protected)
I''ve been puzzling over how to test that attr_accessible has been set for the correct columns; but the tests I''ve come up with so far seem to fail to fail when I expect. I came across this old message from this list: http://www.mail-archive.com/rspec-users at rubyforge.org/msg01570.html Which seemed like a plausible example, but my attempt (modeled on the example)