similar to: Gem and/or meta_where problem

Displaying 20 results from an estimated 5000 matches similar to: "Gem and/or meta_where problem"

2011 Apr 18
1
has a field through an association
Hey guys, Trying to figure out how to do something like the following: class Child belongs_to :parent has_field :some_field, :through => :parent end class Parent has_one :child attr_accessible :some_field end child.some_field #=> parent.some_field child.some_field = value #=> sets parent.some_field = value I can of course accomplish this by adding custom accessors
2011 Feb 27
1
Database abstraction
Hi all - I've been working on a lite ORM and database abstraction package for R. Formatting complex queries by hand has always been an error-prone hassle, so I've tried to do away with that as much as possible, instead, using R objects to represent elements of a database system (statements, clauses, operators, functions, fields, tables, etc.). R5 classes have made the development of this
2002 Jul 13
2
Win98s and Samba
Hello Everyone, I am relatively new to linux and Samba and I am having some difficulties setting Samba up as a Primary Domain Controller. Ihave read the Pdf document called "Using Samba as a PDC" by developrWorks and I have read most of the Howto documents relating to Samba. When I try to connect to my samba server with Win98se I get the message "no Domain server was able to
2007 Nov 07
1
Aggregate with non-scalar function
R-Helpers, I'm sorry to have to ask this -- I've not used R very much in the last 8 or 10 months, and I've gotten rusty. I have the following (ff2 is a subset of a much, much larger dataset): > ff2 hostName user sys idle obsTime 10142 fred 0.4 0.5 98.0 2007-11-01 02:02:18 16886 barney 0.5 0.2 94.6 2007-10-25 19:12:12 8795 fred 0.0 0.1 99.8
2007 Mar 26
1
data-frame adding/deleting column
Hallo, I have got an existing data frame and want to add a new column. The existing data frame was created like this: > df <- rbind( c("Fred", "Mary", 4), c("Fred", "Mary", 7), + c("Fred", "Mary", 9), c("Barney", "Liz", 3), + c("Barney", "Liz", 5) ) > df
2006 Sep 05
1
em watchdog timeout on UP, 6-stable
Updated my Athlon-xp 6-stable system last night, got an em watchdog timeout for the first time a few hours later, during a fairly high-traffic period. System is UP but does have device apic in the config. Any chance this is the recent race condition? Workaround? ifconfig em0 down, ifconfig em0 up seemed to cure it, at least for the moment. Thanks, Barney Wolff -- Barney Wolff I never
2005 Dec 26
5
linux install of RR
Hi. I''ve installed ruby, gems, rails into a user directory according to the installation instructions (for linux). I haven''t setup any path information nor setup any symlinks or any compilation options. When I try rails, I find that the system accesses controllers but that the corresponding views are not displayed. I wonder if there is something that I forgot to configure
1998 Jun 03
1
R-beta: offset and glm again
I guess I understand it now (although it is surprising to me). The following is a valid model formula fred ~ wilma + offset(barney) that sets the model offset to barney. Given that this works, it would seem that one could remove the offset = argument from the glm call (and document the offset feature somewhere). Too bad that one can't set weights the same way. The anova bug when offsets
2007 Mar 26
5
Listing function
Hallo, I build a list by the following way: Lst = list(name="Fred", wife="Mary", no.children=3, cild.ages=c(4,7,9)) I know how I can extract the information one by one. But now I want to add a new entry which looks like name="Barney", wife="Liz", no.children=2, cild.ages=c(3,5) How can I add this information to Lst without overwriting the first entry?
2008 Apr 02
9
Problem getting the most recent has_many associated object
I can''t get my view to display the most recent parameters from an associated object in a view... here is a birds-eye of my app: I have two models, Ferms and Kinetics. Ferm has_many :kinetics, Kinetic belongs_to :ferm. Kinetic has the fields ferm_id, brix and temp. In my ferms/index view I have a table listing the attributes of each ferm instance. I would like to display the most recent
2017 Sep 19
3
what do you think about write.table(... qmethod = "excel")?
Last week one of our clients reported trouble with a csv file I generated with write.table. He said that columns with quotes for character variables were rejected by their data importer, which was revised to match the way Microsoft Excel uses quotation marks in character variables. I explained to them that quoted character variables are virtuous and wise, of course, but they say Microsoft Excel
2007 Mar 13
13
validates_inclusion_of disabling
Hello all. I have a problem using validates_inclusion_of. I need to switch off some validations during a migration period, is there a way? I tried to use if, with a static method of one of my models, but the behaviour is something strange It seems that the static method should be in a string to be evaluated. And the order of the elements in the if is counting... :if => (:some_field
2012 Jan 24
7
Gem install bundler works, gem bundle doesn't?
Hi, I''m having some trouble with bundler: -bash-4.1$ gem install bundler Successfully installed bundler-1.0.21 1 gem installed Installing ri documentation for bundler-1.0.21... Installing RDoc documentation for bundler-1.0.21... -bash-4.1$ bundle install ERRRO: Gem bundler is not installed, run `gem install bundler` first. -- You received this message because you are subscribed to the
2005 Dec 22
11
first day using rails
Hi - this is my first day with Ruby on Rails. I''m starting out by working through the Helloworld (Hello Ruby) example program printed up in "Agile Web Development with Rails." My steps are as in the text: 1. ruby script/generate controller Say 2. edit the proper file and add the hello method 3. fire up the browser using address http://localhost:3000 4. fire up the
2011 Feb 08
4
Remove ActiveRecord::Relation#& alias for 'merge' ? (or at least only reference and not use in AR)
Would the core team be open to the removal of the ''&'' alias for ActiveRecord::Relation#merge? The reason is that in Ruby the ''&'' operator refers to an intersection of two sets of data, not a merge. (within the context of the Array class) Recently Arel added support for SQL Set Operators: 2-0-stable:
2007 May 21
3
defining client/server configs
Still very new to puppet, so go easy :-) Bit of a braindump I''m afraid, but I''d really appreciate any "Yep", "interesting", "No!!!" comments. I''ll start with an example - adding NTP support. This primarily consists of two configs: a) NTP clients - this is quite easy, it''s a templated file requiring the names of the NTP
2011 Apr 21
1
GEMFile gem 'mysql2' and mysql version is 4.1.2
Hi all I have a Gemfile with this value gem ''mysql2'' but when I run this command ''$ bundle install'' on my host they said that "The command "bundle install --local" seems to be returning mysql2 dependency error now. Unfortunately mysql2 gem requires mysql 5.1+ ( refer: https://github.com/brianmario/mysql2/issues/109 ) whereas the server mysql
2011 Jul 14
2
belongs_to --- has_many should update automatically?
On p. 299 of the current Rails book it says that "Active Record takes care of saving all the dependent child rows when you save a parent row." So, when I add a row to the table that has "belongs_to" in its model, shouldn''t the table with the "has_many" be updated with data from the foreign key? If not, how do I save data from a form into more than one
2008 Aug 27
5
VALIDATION QUESTION
I''m trying to validate a record before save. I''m using one controller in this case furnii where I have all my calls. The problem is that, the form containing the field I''m trying to validate resides in the furnii views. I tried to add validates_presence_of :content (the field name) in both the furnii model and the ratecomment model but it does not work. I know there
2006 Sep 05
4
Ferret 0.10.2 - Index#search_each() and :num_docs
Hi, I seem to be having trouble getting more than 10 hits from Index#search_each since upgrading to 0.10.2 (ie, this was working in 0.9.4). Maybe a bug, as the #search_each doesn''t seem to use the options parameter any more ? Thanks, Neville =========================================== require ''rubygems'' require ''ferret'' p Ferret::VERSION idx =