Displaying 20 results from an estimated 900 matches similar to: "Strange error(s) on windows only"
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 Jan 10
1
Problem with belongs_to
I have a model where I have a tree of nodes in one table (acts_as_tree)
where I also use a type column to get inheritance. In this table I also
have a data_id column that refers to another row in another table (the
subclass knows what table).
I also have another class that have this line
class Page < ActiveRecord::Base
belongs_to :node,
:foreign_key =>
2005 Dec 21
0
Overriding inheritance_column
I''m putting together a Rails application that will display information
from an existing database. The database has a "job" table that
contains a "type" column. I''ve successfully overridden the names of
the table and the name of the inheritance column by adding
def self.table_name()
''job''
end
Job.inheritance_column
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
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
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
2007 Mar 28
4
Disabling ActiveRecord "type" column subclassing
Hi! I have a legacy table that has a column named "type" and need to
remove this automatic subclassing by ActiveRecord. The api pages are
vague about this, and I tried
self.inheritance_column = "xtype"
which seemed to get me half-way. In the validate_on_create method, the
value of self.type was my model Class name.
How would you disable this feature?
--
Posted via
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
2006 May 24
10
Ferret slow after a while
I''m building a new index from scratch based on a number of documents
stored in a database loaded using my Rails env (using Ruby Ferret 0.9x
(installed today with Gem) on Windows). At first everything goes nice
but after a number of documents it starts to go slower and slower until
it grinds to a halt (at least feels like it).
Am I doing something wrong? Is there some way to work
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/
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
2005 Feb 02
1
Error when changing from AR 1.0.1 to 1.6
Hello,
I have the following output when changing form Active Record 1.0.1 to
ActiveRecord 1.6:
[error] C:/dev/ruby/lib/ruby/gems/1.8/gems/actionpack-1.4.0/lib/action_controller/support/dependencies.rb:24:in `depend_on'': uninitialized constant ActiveRecord::Mixins (ScriptError)\r
[error] \tfrom
2012 Jun 09
0
Re: 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. P
FIXED: Transaction is a reserved word, and it cannot be used even
though I put it into its own module. So my guess is
Transactions::Transaction still somehow got resolved to the Rails
internal Transaction class.
Renamed the Transaction (and its subclasses) to Transact and it works fine now.
Thanks!
-- cmdjohnson
On Sat, Jun 9, 2012 at 3:08 AM, Commander Johnson
2006 Jan 06
0
[PATCH] [3402] Allow lock_version column name to be configured.
My first stab at the whole metaprogramming / DSL thing. Fun stuff.
Includes unit tests, fixtures, etc, etc. Tested against Oracle and
PostgreSQL so far. I''d appreciate it if some MySQL folks could try it
out. Hopefully I got the MySQL CREATE TABLE syntax correct.
http://dev.rubyonrails.org/ticket/3402
Assuming this kind of thing is OK, I''d like to make
2006 Jul 05
2
Serialized object behaves weird
Hi!
I got a class named EinsatzFilter which I serialized to session. Before
saving to session it works afterwards I keep getting the message:
"undefined method `to_s'' for #<Person:0x38c6ab8>". "Person" is a from
ActiveRecord::Base inherited class.
Code:
class EinsatzFilter
include ApplicationHelper
attr_reader :personen, :monat, :projekte, :kunde
2006 Sep 04
2
"include" versus "extend" - what's the difference
Hi,
Just wondering when one would use "include" over "extend"? Both seem to
bring in methods to the class no?
The context is I''m just trying to understand why both are used with the
acts_as_audited plugin:
Full extract from plugin (used within here):
==================================================
# Copyright (c) 2006 Brandon Keepers
#
# Permission is hereby
2013 Apr 24
8
Problem retreiving catalog
I updated some of my gems, and I think it may be the reason I am getting
the following error when the agents try to retrieve a catalog.
err: Could not retrieve catalog from remote server: Error 400 on SERVER:
The single-table inheritance mechanism failed to locate the subclass:
''Host::Managed''. This error is raised because the column ''type'' is reserved
for
2006 Mar 26
4
select information from sqlite_master error
Hi,
I''m having fun playing around with Camping...I am slowly working on extending tepee to a personal e-notebook sort of tool (never lose my papers/revisions....hehe).
I''ve given tepee an oswd css design, and am currently adding a admin page that I want to show the ruby version, sqlite version and db size and db stats information.
I tried running:
@db_stats =
2006 Jun 26
7
Using Rails to Generate static pages
Hi all,
Has anyone ever thought about or implemented a way to use Rails to pull
content from a database and actually *generate* static html pages from view
templates?
I want to throw a bunch of content into a db using rails and then put all
my website templates into the views dir and write the files out with the
content inside.
The funny thing is that the html pages Rails normally outputs to
2007 Jan 29
2
What does Reloadable mean in rails source code?
In the actionpack-1.12.5\lib\action_controller\base.rb,
you can see the definition:
class Base
include Reloadable::Subclasses
...
And following is the definition of Reloadable:
# Classes that include this module will automatically be reloaded
# by the Rails dispatcher when Dependencies.mechanism = :load.
module Reloadable
class << self
def included(base) #nodoc:
raise