Displaying 20 results from an estimated 11000 matches similar to: "Overriding inheritance_column"
2006 Feb 28
0
ActiveRecord: Legacy primary keys
Hi,
I''m building a frontend for a legacy schema, with tables like this:
CREATE TABLE `types` (
`a_type_cd` varchar(6) NOT NULL default '''',
`a_type` varchar(30) NOT NULL default '''',
PRIMARY KEY (`a_type_cd`)
);
The primary key is specified by the user (not auto-generated), and needs
to be updateable. I create the following a base class to
2008 Apr 03
2
Change the value stored in inheritance_column
I have been struggling for quite sometime with this.
Is there any way to configure the Model to store user defined value in
the inheritance_column instead of the default value (which is
class_name)
The problem I have is like this:
I have a User model and there are different models which inherit from
this like Admin, Premium, Professional, etc.
Each of these inherited models are identified by a
2006 Mar 13
0
Getting AR to downcase table and column names
I''m looking for the cleanest way to force the Rails framework to use a
lower-case version of the table and column names in a database when
creating records.
I need this for a Rails application that displays the status of an
existing backup system. The backup system (Bacula; Nice backup
system, BTW) can use either Postgres or Mysql as its database engine.
Unfortunately, the table and
2006 Jun 01
4
What i do if i have a table with a column named "type"?
Hi everybody!
The class ActiveRecord::Base have a atribute named type and if my
table have a column with the same name i get an error if i use
model.finde, model.save and more...
I dont know what i can do to solve this problem!
Someone know?
Thanks
--
_________
Noel R. Morais
2006 Nov 16
1
Strange indexing issues with CachedModel, STI, and AAF
I started using robotcoop''s CachedModel class in my project but have encountered problems when using it with the acts_as_ferret plugin. It seems it doesn''t index everything in my STI model, also if I do a search from my base STI class I get a result count but no results. If I run the same search from one of the children STI models I get the appropriate results (if the information
2014 Aug 17
1
Overriding global voicemail options on a per-mailbox basis
All;
I'm currently using Asterisk 1.8 and I want to be able to have each user
be able to set as many of the voicemail options as possible. The
documentation calls voicemail options that can be overridden on a
per-mailbox basis "advanced options". However, I've read conflicting
information as to which options in the section [general] can be overridden.
According to
2015 Mar 14
1
Overriding dovecot.conf from Userdb Extras
> > I thought I read that anything from dovecot.conf can be overridden in a
> > userdb lookup. Or a passdb lookup with "userdb_" prefix.
> >
> > But I tried for fun change log_path but it never worked. Is that because
> > logging is special, already started logging before it comes to the
> > passdb/userdb lookups? So are there some dovecot.conf
2015 Mar 09
3
Overriding dovecot.conf from Userdb Extras
Hi,
I thought I read that anything from dovecot.conf can be overridden in a
userdb lookup. Or a passdb lookup with "userdb_" prefix.
But I tried for fun change log_path but it never worked. Is that because
logging is special, already started logging before it comes to the
passdb/userdb lookups? So are there some dovecot.conf settings
that cannot be overridden?
Thanks!
2006 Jan 17
0
Overriding Delete/Destroy in ActiveRecord
Anybody know how I can override delete/destroy in objects that have
has_and_belongs_to_many behavior specified?
I''m having issues overriding delete for an ActiveRecord object that
contains a has_and_belongs_to_many relationship. Delete and destroy
are properly overridden for objects that do not have
has_and_belongs_to_many relationships specified, but as soon as I add
any the overridden
2015 Mar 13
0
Overriding dovecot.conf from Userdb Extras
Il 9 marzo 2015 alle 4.17 "E.B." <emailbuilder88 at yahoo.com> ha scritto:
> I thought I read that anything from dovecot.conf can be overridden in a
> userdb lookup. Or a passdb lookup with "userdb_" prefix.
>
> But I tried for fun change log_path but it never worked. Is that because
> logging is special, already started logging before it comes to the
2005 Nov 01
5
Strange error(s) on windows only
I have some strange behaviour on Windows XP boxes (the same code on
Linux doesn''t have the same behaviour). Ruby 1.8.2 and Rails 0.14.2.
I have a single inheritance table nodes with a base class Node
(acts_as_tree) and some subclasses such as PageNode and FolderNode. If I
render the tree in an iframe in a set of iframes it doesn''t work, if I
render it stand alone it works
2006 Aug 23
2
Re: STI and Joins Broken
I''ve made a inheritance rework some weeks ago that would possible fix
it since it only loads the inheritance support in the class that''ll use
it.
In STI case, it would load only if the class that descends directly
from AR has been inherited and the column specified in the
inheritance_column is available.
People here told me to wait until next release so we can dig into this,
but
2012 Jun 09
3
ActiveRecord::SubclassNotFound: The single-table inheritance mechanism failed to locate the subclass: 'Transactions::DummyDdnlTransaction'. This error is raised because the column 'type' is reserved for storing the class in case of inheritance. Pleas
Hello,
I stumble upon this error when loading a subclass of the Transaction
class. For full details, see the pastie:
http://pastie.org/4053678
Error message: ActiveRecord::SubclassNotFound: The single-table
inheritance mechanism failed to locate the subclass:
''Transactions::DummyDdnlTransaction''. This error is raised because the
column ''type'' is reserved for
2013 Dec 16
1
Overriding class options with hiera
Hi,
I''m trying to do something with Hiera, whereby the ''default'' configuration
for a class is within it''s role/profile manifest, which can then be
overridden on a node specific basis by hiera.
As an example;
class profile::base {
class { ''::ntp'':
servers => [''a'', ''b'', ''c'',
2006 Aug 20
0
Re: Problem with overriding rails accessor methods
On 8/20/06, Paul Corcoran <prcorcoran-Wuw85uim5zDR7s880joybQ@public.gmane.org> wrote:
>
>
> Hello all,
>
> I just encountered something that is not what I would expect. I
> overrode an accessor method in my model class and within this method I
> did a "super" call which failed. Of couse my real method would be doing
> more but here is the basic code that
2007 Nov 07
1
Serialization of ActiveRecord Instances: No Inheritance Column?
Hey,
I have been looking at ActiveRecord''s serialization code, and noticed
that ActiveRecord::XmlSerializer#serializable_attributes purposely
excludes the STI inheritance column per ``options[:except] =
Array(options[:except]) | Array(@record.class.inheritance_column).''''
Is there a particular reason for this? Would anyone be opposed to my
writing a patch to have this
2007 Jul 31
0
Patch: Allow overriding of handler dispatch in Mongrel::HttpServer
Hi Zed (and list),
I first of all wanted to thank you for all the hard work you''ve done
to make writing
HTTP services in Ruby easier and more reliable. A friend of mine and
I are developing
a network filestore service (similar to S3) based on Mongrel, and we
got a fairly
useful set of functionality done and working in a matter of a few
weeks thanks
largely to your work. Mongrel
2006 Jul 28
0
reserved words
I''ve seen this topic has been discussed a couple of times. However, I''m
wondering if a method exists in rails to test a name against the reserved
words listed on the wiki?
Just wanted to check before I write this myself (and type in all of those
names -- including PostgreSQL).
To explain the application:
I''ve written a project that manages ldap data. On a fresh
2006 Jan 06
0
bug rails activerecord association join
hi,
I found a bug in ActiveRecord association SQL INNER JOIN codes. in
has_many, has_one, habtm and belongs_to queries the foreign key is
determined from the table name of reflection and self. but that''s
worng because if you use a global prefix or suffix for your tables the
foreign keys will be in format of PREFIX_CLASSNAME_SUFFIX_id which is
wrong, because it breaks the advantage of
2006 May 11
0
Handling instantiate_without_callbacks
Hi,
I''m writing this app with inheritance. I''m using the type column to
store the class name. Another app scans the app and performs actions.
However, it is possible that the second app does not implement a
class, in which case, the superclass should be instantiated. Now I''m
getting:
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/