similar to: Inheritance and forms

Displaying 20 results from an estimated 20000 matches similar to: "Inheritance and forms"

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 Jul 06
5
Single table inheritance
I''m having a class called Person, with subclasses as goalkeeper, forward, defender. Now a person can be a forward as well as a defender or a goalkeeper. I want to use single table inheritance like : class Goalkeepr < Person end And not have multiple boolean columns like in my people table like is is_goalkpeer, is_forward, is_defender. How do I go about it ? Thanks, Pratik -- rm
2002 Dec 19
1
private user accounts
hello guys.. I have put up a share for a particular user. The user can access the directory from linux boxes using 'smbclient //IP/share -U privateuser . But cant do it from a windows machine. When I provide the privateuser,password, i get the error 'The credentials supplied conflict with an existing set of credentials.' Why is this? Thanks for the help.
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
2006 Oct 10
3
Dynamic fields and inheritance
I have a model that allows subclasses to dynamically define fields. The following code is a short test case that illustrates the problem I''m having: class Product < ActiveRecord::Base acts_as_ferret :fields => [:name] serialize :data def self.data_properties (*properties) properties.each do |property| define_method(property) {self.get_property(property)}
2007 Aug 19
6
layout inheritance
According to "Ruby On Rails", the layout call is suppose to be inherited: (page 508) "Subclasses of a controller will use the parent''s layout unless they override it using the layout directive" I have a case where this is not working. I have not spent time to concoct a stand alone test. I wanted to verify that David''s book is correct first. Can someone
2009 Jun 23
0
roles, STI and convention
Hi, I have been using the restful_authentication plugin and the default roles setup that it came with. I have a system with 1 admin, 20-30 clients(customers) and 500+ users all of whom can login. I found that often when using certain role-based functions like user.has_role?, mysql would send an IN() query with the id of every user in the system (500+). This seemed a lot of overkill for what it was
2006 Jan 03
3
What''s the best way to do complex inheritance?
I have a Merchant class that has many Products. Product is an abstract class which has many subclasses (ProductA, ProductB, etc). All Products have common data, like ''name'', ''status'', ''created_on'', etc... but they also have some completely different properties. It seems like Active Record only supports Single Table Inheritance. This
2006 Jan 15
2
single table inheritance: change object ''type'' after create?
Hey folks, I''m trying to keep track of couple of different kinds of "entities" in my rails app: "people", "organizations", and "committees". I have a single Entities table in the database, and I''m using Single Table Inheritance to keep the different subclasses in the same table, with a field "type". My problem comes when
2006 Nov 04
0
newbie: Single Table Inheritance
Hello, I have been experimenting with Single Table Inheritance as described in the More Active Record chapter in Agile Development with Rails. I have started with an object model with three classes x, y and z (for brevity), where y < x and z < y. (I will want to extend this model further to subclass y with other classes.) I have created a table called x (plural) in the database with
2006 Aug 15
0
ActiveRecord inheritance with types table
I have a Field class: class Field < ActiveRecord::Base belongs_to :field_type end with it''s table: fields: id field_type_id name ordering every field has a type class FieldType < ActiveRecord::Base end stored in the field_types table field_types: id name class_name for each field type, there''s a subclass of Field that do whatever special
2006 Apr 15
8
Inheritance in Rails - I need some help
I''ve got a model, "category" and another model "subcategory." Each subcategory belongs_to a category, and a category has_many subcategories. What I need to do is set it up so that I can search Category and Subcategory with one .find call. So: Category.find(:all, <etc) will find categories and subcategories. Now, I believe this can be done by making
2006 Apr 09
4
Inheritance via Though Associations?
I posted something about this a week ago wihtout response, but have made some progress since. However, I''m still not getting exactly what I want. OK, three core tables: create_table :reference_items do |t| t.column :title, :string, :limit => 255 t.column :year, :integer, :limit => 4 t.column :type, :string t.column
2006 Aug 17
0
single-table inheritance and select
I''m getting some weirdness trying to use a select widget to choose the type from a collection of three objects sharing a database table via single-table inheritance (STI). I''d be grateful for any advice on whether it''s a bug or a feature, if a feature why and how I can more easily do what I''m trying to do. So I have the usual STI setup, with a
2005 Sep 29
0
Table relationships with single table inheritance
Hi, How do I relate a table to another when one of the models uses single table inheritance? Will this even work? This is the specific problem I am having: There''s an "Address" model with "ShippingAddress" and "BillingAddress" as subclasses. It looks like this: class Address < ActiveRecord::Base End class ShippingAddress < Address has_one :order
2008 Oct 06
2
Filter inheritance
can anyone tell me how before filter can call the private method audit which from the parent class ? because the bank controller has a private method called audit, this one should not be inheritance by VaultController, so how the before_filter use the private method audit ? if the child class can use the parent class private method . does it break encapsulation ? does the private has any sense
2006 Jul 02
7
Generic SingleTable inheritance
Hi all, I would like to discuss a design idea I have in mind with you, in order to get critical feedback. ActiveRecord supports single table inheritance(STI) "per se", BUT you must add all possible instance variables(properties) of all subclasses to the "base table"(as columns). I would like to circumvent this restriction. Say we have a class AbstractGenericThing <
2007 Feb 06
4
Inheritance design question
I''m new to ruby rails and am trying to design my first real rails web app. The app is intended to model a shareware business. It will provide a place where users can learn about new projects, track their progress, and provide feedback. Here''s a simplified list of the model objects that I''ll need: Project - has title, description, creation, modification. Release - has
2008 Jan 17
0
It seems to be a restful_authentication bug (was Re: Re: named route new_session not working)
On 1/16/08, Jimmy Palmer <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > > sorry for the ambiguity. I will work on being more descriptive. :) > > In the method access_denied in the file authenticated_system.rb from > restful athentication, it generates this: > > def access_denied > respond_to do |format| > format.html do >
2006 Jan 13
4
Single Table Inheritance (this is my 3rd post :( )
Hi Everyone, I hope I get some feedback on my question. Here it goes. I have a situation here, I have a company table and then using Single Table inheritance it is of 3 types: class Company < ActiveRecord::Base end class Vendor < Company end class Customer < Company end class Agent < Company end Now I have a active record Association class QuoteSheet < ActiveRecord::Base