similar to: problem redefining module method

Displaying 20 results from an estimated 20000 matches similar to: "problem redefining module method"

2006 Mar 07
3
STI and unit testing
Hi all, I''m having a bit of a problem with unit testing. I''ve simplified my models to try and get my head round it but I''m still struggling. I''m using STI and trying to write tests for the extended models (code below). I''ve written test cases for the extended models which themselves extend the test case for the parent model, so BarTest extends
2009 Jul 28
4
RJS-Template and link_to_remote
Hi, I am quite new to rails and can''t use any rjs-templates. The problem is, that he can''t use/find the methods in that template e.g. ''page'' or ''replace_html''. I get an error message on these methods. Here''s what I got so far in my example: Controller: ---- class AjaxTestController < ApplicationController layout
2007 Jan 13
3
duplicate definition when inheriting classes
I thought the purpose of classes was that you could redefine types in the subclasses. However I get "Duplicate definition" errors whenever I attempt this. On a whim I tried the code from the documentation: http://reductivelabs.com/projects/puppet/documentation/structures.html --- Subclassing The primary benefit of using subclasses instead of just including the parent class is that
2010 Feb 11
2
LinkingTo and C++
Hello, I've been trying to make LinkingTo work when the package linked to has c++ code. I've put dumb packages to illustrate this emails here ; http://addictedtor.free.fr/misc/linkingto Package A defines this C++ class: class A { public: A() ; ~A() ; SEXP hello() ; } ; Package B has this function : SEXP say_hello(){ A a ; return a.hello() ; } headers of package A are copied
2015 Apr 17
3
Redefining {
I am curious if anyone knows of R code where the "{" function is redefined in a useful way. Or "(" for that matter. Thanks Mick
2006 Feb 14
3
Can Ajax updates more than one <div>?
Hi, I wish to know, is it possible that Ajax can update more than one zone "<div>"???? like : <%= link_to_remote("Title", :update => ''mydiv0'', :url => {:action=>:say_hello} )%> <div id="mydiv0"> to be changed one</div> <div id="mydiv0"> to be changed two</div> When I execute the code, only
2008 Jan 17
6
how to control self.method access
i think self.method just like class method,so if i want to define it as a private method,i should use private_class_method :my_method but i found follow code in < <Agile Web Development with Rails>> private def self.hash_password(password) Digest::SHA1.hexdigest(password) end just a mistake or there have some thing which i cannot get?
2006 Nov 09
2
redefining the method belongs_to in ActiveRecord::Base
Hi. I''ve tried to redefine the method belongs_to in ActiveRecord::Base, so every time a model is defined as belonging to :attachment, it should have some additional methods. I tried to do an alias of belongs_to, but this was not successful. The error message in Webrick was > Booting WEBrick... ./script/../config/../lib/ActiveRecordExtensions.rb:67: undefined method
2006 Mar 23
1
using :include with acts_as_tree?
Is there a way to eager load children with a model that acts_as_tree? I tried: :include => :children but it gives a mysql error... Thanks, Justin
2010 Jan 29
2
[LLVMdev] Redefining function
Hi everybody. I've just started learning about LLVM and didn't get too far studying the core. I couldn't find the solution to my problem (if it has one) in the mailing list or the source code. The problem is: how can I redefine a function that's been called already by some other function? Suppose I have 3 files, all compiled to bytecode through llvm-gcc (I think it could be clang
2012 Nov 08
2
TE820 hardware detection
I just installed a TE820 octal span T1 card, and it's not showing up in dahdi_hardware output. This was installed into a test machine that already has a TDM800P card in it, and that one is showing up and working fine. Is there some kernel module that I'm missing? Lspci: 05:04.0 Ethernet controller: Digium, Inc. Wildcard TDM800P 8-port analog card (rev 11) 21:08.0 Communication
2006 Jul 20
5
RJS where to put helper method?
Hi, If I want to have helper method for my rjs, where''s the best place to put it? so for example: --- bla.rjs: page.replace_html ... page.visual_effect ... --- somewhere: (currently I put in application_helper.rb) def replace_with_effect(page) page.replace_html ... page.visual_effect ... end --- bla.rjs: replace_with_effect page and is there a way to define the helper so we
2005 Oct 12
1
[ win32utils-Support Requests-2614 ] warning: redefining constant Struct::Win32ServiceStatus
Support Requests item #2614, was opened at 2005-10-12 10:23 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=412&aid=2614&group_id=85 Category: win32-service Group: None Status: Open Resolution: None Priority: 3 Submitted By: Scott Harper (sharperct) Assigned to: Nobody (None) Summary: warning: redefining constant Struct::Win32ServiceStatus Initial
2010 Jan 30
0
[LLVMdev] Redefining function
Hi Conrado, > I couldn't find the solution to my problem (if it has one) in the > mailing list or the source code. The problem is: how can I redefine a > function that's been called already by some other function? why do you want to do this? > Suppose I have 3 files, all compiled to bytecode through llvm-gcc (I > think it could be clang instead). > > File1.c:
2012 Jun 01
1
Redefine multiple columns (using grep) as factor variables
Hi, I have a dataframe with around 100 columns. Now I want to redefine some of the columns as factors (using as.factor). Luckily all the names of the columns I want to redefine start with "crast". Thus I thought I can use grep() for that purpose... ...I found an example for redefining a single column as factor but that is not working with multiple columns I get from grep()... what I
2014 Feb 08
1
Redefining .Call
Hi All, is there a caveat in redefining .Call in a package? (Apart from the performance hit of the extra function call.) I want to execute a check every time I call back to C, and this seems to be the easiest solution, instead of modifying all functions of the package. It also seems to be a good way to supply the PACKAGE argument, btw. I guess this is a good solution, but I might have
2006 Oct 01
9
How to create a very simple form
Hi all, I would like to create a very simple form with RoR similar to this one in ASP.Net: http://quickstarts.asp.net/QuickStartv20/aspnet/samples/ctrlref/standard/TextBox/TextBox1_vb.aspx I my RoR project I want to add a Greeter class like this one: class Greeter def initialize(name = "World") @name = name end def say_hi puts "Hi #{@name}!" end def
2005 Mar 10
24
(Online) documentation for 1.0
With the big One-Oh on it''s way, I''m thinking we should perhaps start to work on the documentation some more. The RDoc format is perfectly fine, and does its job beautifully, but I think it doesn''t quite reflect the whizbang value that rails has, especially for newcomers. As one who has looked at the api docs almost daily for several months, I feel quite comfortable
2018 Oct 30
7
IBM buying RedHat
> On 10/29/18 1:55 AM, Simon Matter wrote: >> To me it seems like, if they are smart, they will try to push IBM POWER >> and RedHat Linux together to establish real competition in the hardware >> market again (and of course don't forget to keep Fedora/CentOS alive)! > > Er, RHEL has been running on Power for a very long time. The fastest > supercomputer in the
2007 May 10
13
Is there a way to do incremental search?
Say the user first enters "ruby" for search and gets 1000 results. Then he can search "rails" just in the 1000 results just returned. The common scenario is some kind of advanced search. User can incrementally add criteria and the program will narrow the results step by step. I know that at least I can use all the criteria as a whole to do the searching, but this is a waste