similar to: namespaces in subclasses

Displaying 20 results from an estimated 3000 matches similar to: "namespaces in subclasses"

2008 Aug 15
7
Autotest and subclasses / namespaces
I am writing a controller admin/cities_controller.rb it inherits from AdminController, so it''s defined like class Admin::CitiesController > AdminController Whenever I save the controller file, autotest freaks out: uninitialized constant Admin::AdminController (NameError) I''m pretty used to just hitting CTRL-C to get autotest to re-load all the files, or flicking to
2012 Feb 16
1
How to disable instrumentation in rails 3?
There is a bug in jruby that causes thread locks around things like accesses to class attributes created with class_attribute. The notifications system is affected by this, and it''s blowing up our app. We need to disable all instrumentation and notifications for the time being. Anyone know how to do that cleanly? CHris -- You received this message because you are subscribed to the
2006 Mar 01
4
STI, subclasses and callbacks
I have a STI class tree. I want to set some default values (calculated values so I can''t set it in the database as defaults) on every created instance regardless of what subclass is actually instantiated. So I figured adding a after_create callback in the top class in the hierarchy should do the trick. It seems it doesn''t get called :( Code: class SuperClass <
2006 Aug 07
16
Monthly billing and payment processor recommendations?
Hi, I''m setting up a site that will bill on a monthly basis. I would rather not have to worry about storing customer credit card information. Does anyone have recommendations on payment processors that offer monthly billing services? I don''t want to go the paypal route as I want the user to stay on the site. I''m hoping to find an API to integrate with. I have
2006 Mar 07
17
Handling Erros from AWDWR
I''m getting to the point now where I really need to start trapping the errors. So from my AWDWR book, I added the following directly from the book into application.rb... def rescue_action_in_public(exception) case exception when ActiveRecord::RecordNotFound, ActionController::UnknownAction render(:file => "#{RAILS_ROOT}/public/404.html",
2006 Jan 19
3
Why does Object.subclasses_of ignore subclasses within modules?
ActiveSupport provides a method Object.subclasses_of, shown below: def subclasses_of(*superclasses) subclasses = [] ObjectSpace.each_object(Class) do |k| next if (k.ancestors & superclasses).empty? || superclasses.include?(k) || k.to_s.include?("::") || subclasses.include?(k) subclasses << k end subclasses end Can anyone shine some light on why
2006 Jan 02
0
Best practice for registering/discovering STI subclasses?
Folks, I''m fairly new to Rails, and I''ve Googled around for an answer to this question with no luck... Consider a little blog application that has uses single-table inheritance for the handful of different content types via a Content base class and subclasses like FooContent and BarContent. That part all works well for me. Now consider the view that presents actions to the
2011 May 30
1
Query super- and subclasses of a class: is there a better way than to use 'completeClassDefinition()'
Dear List, when I first started to use S4 classes, I used the function 'completeClassDef()' in order to see the super- and subclasses of a certain class: setClass(Class="A", representation=list(a="numeric")) setClass(Class="B", contains="A", representation=list(b="character")) # Super x <- completeClassDefinition("B")
2006 Jan 09
0
Problem with publishing subclasses by AWS API specification
Hi, I''m quite new to Rails and have a problem with the use of AWS. The Problem is, that I have a class which provides some basic attributes and some subclasses of this with more specific attributes. I want to send objects of those classes through SOAP by a remote client, but if I specify just the base class in the method signature of my API definition the generated WSDL file will
2006 Jan 11
0
HELP!! - Problem with AWS and subclasses
Hi, I''m quite new to Rails and have a problem with the use of AWS. The Problem is, that I have a class which provides some basic attributes and some subclasses of this with more specific attributes. I want to send objects of those classes through SOAP by a remote client, but if I specify just the base class in the method signature of my API definition the generated WSDL file will just
2006 Jan 18
0
subclasses_of - why does it ignore subclasses within modules?
ActiveSupport provides a method Object.subclasses_of, to give the subclasses of a given class. However, it ignores any subclass within a module, so : class A end class B < A end Object.subclasses_of(A) # returns [B] module C class D < A end end Object.subclasses_of(A) # returns [B], even though C::D is also a subclass of A class E < C::D end Object.subclasses_of(A) # returns
2011 Jul 14
0
subclasses with inherited_resources?
I''m trying out inherited_resources and so far so good. However, one problem I''ve run into is that it''s very difficult to customize inherited_resource behaviour in subclasses. Looking through the source I see it uses things like undef_method and class_attribute. For example, if I have the following controllers: class ItemsController inherit_resources actions :new,
2004 May 26
0
[LLVMdev] Changes in llvm::Instruction and subclasses
This should not affect current code but it may help people who deal with LLVM instructions. Up till now one could create an llvm::Instruction (and subclasses) using the following constructor: Instruction(const Type *Ty, unsigned iType, const std::string &Name ="", Instruction *InsertBefore = 0); If InsertBefore was specified the instruction was added to the basic block
2012 Mar 13
2
Definition of generic function for subclasses
Hi, I am working on a project, which contains S4 classes and subclasses. Lets assume the following organisation: A: S4 Class B,C: inherit from A D,E,F,G: inherit from B H,I: inherit from C I want to define now a generic function, which returns me the name of the class. I can now write the function with "A" in the signature. Is there any reason to write the function for B,C, D,E,... with
2011 Oct 18
0
[LLVMdev] Question about MCExpr and subclasses
That just means the ELF writer doesn't know yet how to deal with the target-specific data. It needs taught how to map them onto relocations and such. Do you really need to subclass MCTargetExpr? That's ordinarily only for operands that aren't representable via the normal MC stuff (for example, the ARM movw/movt relocations). You should be able represent normal symbol operands w/o
2010 Oct 20
2
new.env does not recognize parents from subclasses of "environment"
Dear Developers, A lot has been changed in the R12.0 with respect to behavior of "environment" subclasses. Many thanks for that. One small irregularity, though; new.env does not allow the parent to be from S4 subclass. > setClass("myenv", contains="environment") [1] "myenv" > new.env(parent=new("myenv")) Error in new.env(parent =
2009 Jun 19
0
ActiveRecord - Joined subclasses possible?
Hi all, I''m thinking about making the switch to RoR for one of my projects. I''m trying to figure out if ActiveRecord can handle one of my inheritance hierarchies before I do. I have a more detailed question up on stackoverflow: http://snurl.com/kg89x Is this possible? Thoughts?
2016 Apr 19
0
S3 dispatch for S4 subclasses only works if variable "extends" is accessible from global environment
Right, the methods package is not attached by default when running R with Rscript. We should probably remove that special case, as it mostly just leads to confusion, but that won't happen immediately. For now, the S4_extends() should probably throw an error when the methods namespace is not loaded. And the check should be changed to directly check whether R_MethodsNamespace has been set to
2016 Apr 19
0
S3 dispatch for S4 subclasses only works if variable "extends" is accessible from global environment
Not sure why R_has_methods_attached() exists. Maybe Martin could shed some light on that. On Mon, Apr 18, 2016 at 11:50 PM, Kirill M?ller <kirill.mueller at ivt.baug.ethz.ch> wrote: > Thanks for looking into it, your approach sounds good to me. See also > R_has_methods_attached() >
2006 Jan 01
3
Single Table inheitance doesn''t show subclasses ?
Hi, I am a Rails noob. Suppose you have: --- class Animal < ActiveRecord::Base end class Mammal < Animal end class Cow < Mammal end --- I provide Animal,Mammal and Cow controllers with the scaffolding, just to test and to fill up the Animal table. I can see the "type" column getting it''s value set with the class name. So far, soo good. Now, since listing Animals