similar to: undefined method?

Displaying 20 results from an estimated 300 matches similar to: "undefined method?"

2010 Nov 05
2
ActiveRecords queries: .where vs .find
I have a dataset, which contains a day column that I would like to retrieve results on. Is there any reason why daily_stats.where(''day = Date(?)'', dte).first returns and empty set, daily_stats.find(:first, :conditions => [''date(day) = ?'', dte]) returns the correct data and daily_stats.where({:created_at => (date.midnight - 1.day)..date.midnight}).first
2010 Oct 11
12
Need advice on controller / view
Need some advice. I''ve got two modules: artists and paintings. In my home page, I''ve got a 2nd page that says "Browse paintings", which displays ALL paintings of ALL artists. This is being rendered by paintings#index. In another page, I should show all paintings of a specific artist ONLY. Meaning, paintings from ONE artist. I cant use paintings#index for this anymore
2010 Feb 11
3
Parameterized ActiveRecord Associations: Any such thing?
Hi list, how are ya? So, my current project is just begging for the ability to have parameterized associations in my ActiveRecord classes. Basically I need something that is a cross between named scopes and standard associations (has_many specifically). I''m wondering if such a thing exists or, if not, if anyone else has an elegant, equivalent solution? Example: class Sprocket <
2008 Oct 10
2
Add hash to serialized column
Hey guys, I''m trying to merge a hash with another using the .merge! function. class User < ActiveRecord::Base serialize :preferences end This is what I end up with in the console: >> u = User.find(1) >> u.preferences.merge!{:test => 1} SyntaxError: compile error (irb):32: syntax error, unexpected tASSOC, expecting ''}'' u.preferences.merge!{:test
2010 Oct 12
2
STI and :through, not working?
Artist.first.medias returns all medias. Media is an STI. Media can be video or painting. How do I return all paintings of an artist? Only paintings, not videos? In my Artist model, I tried putting: has_many :paintings, :through => :medias In console, I do: Artist.first.paintings.all And I get: ActiveRecord::HasManyThroughSourceAssociationNotFoundError: Could not find the source
2008 Sep 18
8
handling association changes? What's the best practice?
Hello all! I have a conundrum that I''m _sure_ someone else has already thought of and solved. How does one best handle the scenario of association object changes and data integrity? For example, if I have a standard ecommerce site that sells Products and people can have Orders and an Order has_many Products... then, what happens if Product #3 is part of Order #2 but at some point, the
2010 Oct 13
3
using pg on snow leopard
I have a macbook running snow leopard. I recently installed postgresql 9.0 on it. I also installed pg with the following command: sudo env ARCHFLAGS=''-arch x86_64'' gem install pg The result was fine: Building native extensions. This could take a while... Successfully installed pg-0.9.0 1 gem installed Installing ri documentation for pg-0.9.0... Installing RDoc documentation
2008 Oct 10
2
Another "I'm I right" question...
I''m pretty sure that there''s a better way to do this: @roles = Role.find(:all) @selected_role = Role.find(@user.role_id) Can someone help me? --~--~---------~--~----~------------~-------~--~----~ 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
2007 Mar 16
1
sort_link_helper and cross-controller partials
Hello Rubyists, I ran into a problem with sorting a table (rendered in a partial) using the sort_link_helper methods after I have submitted data and re-rendered the table through an AJAX request. The setup is a follows: The table is a shared partial of Controller1 and Controller2 accessible via "shared/table". The AJAX''ed sorting using the sort helper works all fine on
2006 Jul 11
1
Can one controller use another''s Helper Methods?
If I have controller1 and controller2, how would controller1 call method Arf in controller2''s helpers? Thanks, Ben Lisbakken -- Posted via http://www.ruby-forum.com/.
2015 Apr 08
2
[LLVMdev] CUDA front-end (CUDA to LLVM IR)
On Wed, Apr 8, 2015 at 10:12 AM, Dmitry Mikushin <dmitry at kernelgen.org> wrote: > A tool of this kind here: https://github.com/apc-llc/nvcc-llvm-ir > > 2015-04-08 19:01 GMT+02:00 Ahmed ElTantawy <ahmede at ece.ubc.ca>: > >> Hi, >> >> I wanted to ask whether there is ongoing effort (or an already >> established tool) that enables to convert CUDA
2007 Feb 06
2
using the old user profiles for the new PDC
Hi, A few days ago PDC crashed and I setup a new PDC with the same domain name. I have recreated the user accounts but when the users login, windows xp clients create a new profile. Is there a way to make the windows clients use the old profiles? Thanks. -- Erol
2016 May 12
2
Problem with Install R on Linux Ubuntu 16.04 Xenial Xerus
On 12 May 2016 at 09:17, Erol Biceroglu wrote: | Side question... would this have anything to do with 16.04 being new and | (potentially) "less stable" than 14.04?? Or put another way, would this issue | come up under 14.04? No. User error (with apt-config files) is orthogonal to release quality. And FWIW some people seem to be quite positive on 16.04:
2003 Oct 07
5
auto 'modprobe wct1xxp' on startup?
Hi guys, Thanks for your answers on my two questions yesterday. That's exactly what I was looking for, sorry for not noticing it myself, but I'm still getting acclimated to Asterisk and even Linux--from what I see so far, I love it. I've got another one now. Since my Asterisk install and configuration is fairly stable at this point, I'm interested it ensuring that during
2006 Oct 27
2
0 channels configured with tdm400 (tdm04b rev. G)
Hi, Some weird problem (or I'm too sleepy) happens with a tdm04B revision G (4fxo) Steps: modprobe zaptel modprobe wctdm ztcfg -vv /etc/zaptel.conf fxsls=1-4 # TDM04B defaultzone=us loadzone=us /etc/asterisk/zapata.conf signalling=fxs_ls group=1 context=incoming channel => 1-4 modprobe zaptel and wctdm load fine, however ztcfg -vv shows: 0 channels configured Im using centos 4.4 with
2015 Feb 14
2
[LLVMdev] Y.A.Project based on LLVM: ParaSail LLVM-Based compiler
ParaSail (http://parasail-lang.org) is a safe pervasively-parallel object-oriented programming language. Starting in June 2014 we began the construction of an LLVM-based backend for ParaSail. The existing ParaSail interpreter is broken into a front end that generates instructions for the "ParaSail Virtual Machine" (PSVM), and an interpreter for PSVM instructions. The LLVM-based
2020 May 08
1
Changing ssrc
Hi Everyone, We're routing calls through Asterisk (dialing in via sip and then dialing out via SIP). We've noticed a curious behavior in chan_sip that doesn't persist with chan_pjsip. When examining the packet capture, we're seeing the SSRC changing constantly on the call. At first it happens over a variable interval (15s 6s etc) but eventually it ends up changing exactly every
2005 Sep 06
7
Cookbook receipe for SCSI tape install requested.
I need to install an HP Surestore dlt on a Centos 4 machine and I am at a loss as to how to proceed. Can someone either provide or point me to an online reference on how to proceed to add and configure a SCSI adapter and tape drive. I have read, but not really understood, the man page entry for st. Does kudzu handle this? Regards, Jim I am a digest subscriber so the favour of an
2008 Mar 09
1
Two sample t-test
Hi, I want to perform t-test in R for each individual car. Here is what i have. Is there a way i can test each car? The original table (test.csv) Car Tester2 Tester2 Controller1 Controller2 Audi 0.56 0.9 0.5 0.9 Toyota 0.2 0.9 0.9 0.2 Honda 0.5 0.9 0.1 0.5 BMW 0.2 0.3 0.5 0.7 > cars<-read.table("c://test.csv",header=T,sep=",", + skip=2,comment.char="")
2006 Mar 14
1
Controller detection order
Hi, I have a dell poweredge 850 with centos 4, freshly installed. I'm now trying to add in a fibre -> sata raid enclosure with LSI HBA's in the 850. My problem is the enclosure gets detected first, hijacking sda and sdb from the internal SATA drive and causing kernel panic at boot time. I've tried changing the order in modprobe to the following: alias eth0 tg3 alias eth1