Displaying 20 results from an estimated 1000 matches similar to: "Single Table Inheritance (this is my 3rd post :( )"
2006 May 08
4
How to disable textbox in Ruby?
Hi,
I want to disable textbox in my page so that user can not modify its
contents. How can we do that in ruby?
Thanx,
Prash
--
Posted via http://www.ruby-forum.com/.
2006 Apr 02
7
RANT: belongs_to -> refers_to
Every once in a while, I pipe up and whine that "belongs_to" should really
be ''refers_to" [http://dev.rubyonrails.org/ticket/2130]. It''s time again.
I''ve got a bunch of stuff going onto eBay, so, like any good engineer, I
don''t just post it manually: I design a Rails-based inventory database that
creates a semantically-correct XHTML/CSS auction
2006 Jul 25
2
Authentication design/ideas
Hi all,
I''m using acts_as_authenticated for the front end facing part of my
site. I have a model called Customer. I now want to protect the admin
sides of things. I am thinking of using Ezra''s acl plugin
(http://opensvn.csie.org/ezra/rails/plugins/dev/acl_system2/README)
for this. My only problem is that I don''t want the model for admin
users to be called Customer,
2006 Jan 22
2
suggest for "ambiguous column" when JOIN associated tables
Today I face with incorrect behavior in ActiveRecord.
It take place when I try to use :include parameter for .find method.
Where are two typical cases:
1. You have record with self-referential joins
CREATE TABLE keywords (id, group_id);
class Keyword < ActiveRecord::Base
belongs_to :group,
:class_name => "Keyword",
:foreign_key =>
2006 Apr 04
4
Aggregating two objects of the same type
I would like to have a customer that has references to two addresses,
a billing address and a shipping address. In a non-rails environment
I would have two keys in the customers table, billing_address_id and
shipping_address_id to reference the addresses. It appears that
ActiveRecord expects the parent id to reside in the child table,
regardless of whether the relationship is one-to-one or
2009 Oct 29
4
Unknown column 'quotes.organisation_id' in 'where clause': SELECT * FROM `quotes` WHERE (`quotes`.organisation_id = 1036)
Hi,
I have a small app that needs to keep track of quotes, and
organisations. An organisation can either be the unit who finally
receives the goods (the end_user) or and intermediary (customer) (and in
some cases both)
An Organisation will (hopefully :) ) have many quotes; and a quote
can belong to an organisation, either as a customer or as an end_user or
both.
So the quotes table
2006 Apr 03
1
Single table inheritance and relations
All,
I''ve a question concerning STI in Rails. Let''s say I''ve a Person class
and two classes that inherit from Person: User and Customer. In the DB
I''ve the people table to store both instances of User and Customer.
Now, let''s say I also have Address class, which references a Customer,
and each customer has many addresses. How should I name the
2005 Dec 29
9
Single Table Inheritance
Hi all,
Quick question for STI. With the following setup:
class Company < AR::Base; end
class Firm < Company; end
Why does Firm.find(:all) return all Companies, not just those that have
type==''Firm''?
--
Alex
2006 Feb 18
4
Using Sqlite3 Activerecord with multiple clients
Hi,
Here is my problem. I have sqlite3 as the db backend for rails. In
addition to Rails, I also have another process that is writing to the db
file so that rails can read from the same db file and get updates. The
rails is responsible mostly for reading (and displaying) but also it
occasionally make modifications to it.
However it seems that the activerecord adapter for sqlite3 is locking
2009 Oct 04
3
Problem using ActiveRecord find with :joins and :select
Hi guys,
When I do:
temp = User.find(:all,
:joins => "INNER JOIN contents ON users.agent_id =
contents.id",
:select => "contents.id, users.id, users.u_date")
temp.first.inspect
It seems to work fine, but it only returns:
#<User id: 6, u_date: "2009-10-03 19:32:23">
but not the contents.id information.
I
2013 May 16
2
Does Set Block IO tune take effect in the same session.
Hello All,
I am using virDomainSetBlockIoTune() API to set the IO tune parameter for a
running guest VM.
I observed that after setting the value succesfully i ned to Shutdown and
start the VM inorder to take the set value in effect.
Is there any way with which these values come in effect in the same session
of the VM without Shutting down and starting the VM.
Please help
regards,
Vikrant
2008 Nov 03
17
SQL queries in Rails
Hi...
I want to know the equivalent instructions to insert, update, search
and delete a registry. I know Rails can do it easily Thanks to
ActiveRecord, but here''s the catch: I''m using PostgreSQL. As I''m using
SQL to do the migration (Including the foreign keys), I need to know
if I can use SQL queries to do those actions. Is there an example out
there?
I uncommented
2010 Jul 14
2
Error while connecting to Oracle using RODBC package
Dear All,
I want to connnect R with oracle. I am using RODBC package for this
connection. Following is my code to connect
library(RODBC)
channel <- odbcConnect("Vikrant")
I am getting following error.
1: In odbcDriverConnect("DSN=Vikrant") :
[RODBC] ERROR: state NA000, code 12288, message [Microsoft][ODBC driver
for Oracle][Oracle]ORA-12514: TNS:listener does not
2009 May 14
3
Mysql query is not working
Please,
Can anyone help me to execute this query?
SELECT * FROM table WHERE customer_id IN (SELECT IF(1 <> 2,''SELECT
customer_id FROM customers'',''SELECT customer_id FROM company''))
Regards...
--
Posted via http://www.ruby-forum.com/.
2010 Jan 19
4
how to open excel 2007 (.xlsx) file in R
i am unable to open a file which is saved as .xlsx format in R . The file
contains approximately 1,50,000
rows. So I m not able to save it as csv file.Please suggest ways to open
this file
--
View this message in context: http://n4.nabble.com/how-to-open-excel-2007-xlsx-file-in-R-tp1017273p1017273.html
Sent from the R help mailing list archive at Nabble.com.
2006 Nov 06
2
comparing 2 dataframes
Een ingesloten tekst met niet-gespecificeerde tekenset is
van het bericht gescrubt ...
Naam: niet beschikbaar
Url: https://stat.ethz.ch/pipermail/r-help/attachments/20061106/756382a8/attachment.pl
2010 Jan 15
5
Can I save R graphs as a R objects
Can I save R graphs as a R objects ? IF yes then if I click this R object
can I edit my chart as in Excel.
Please suggest your views
--
View this message in context: http://n4.nabble.com/Can-I-save-R-graphs-as-a-R-objects-tp1014621p1014621.html
Sent from the R help mailing list archive at Nabble.com.
2017 Jun 23
4
R version 3.3.2, Windows 10: Applying a function to each possible pair of rows from two different data-frames
For certain reason, the content was not visible in the last mail, so posting it again.
Dear Members,
I have two different dataframes with a different number of rows. I need to apply a set of functions to each possible combination of rows with one row coming from 1st dataframe and other from 2nd dataframe. Though I am able to perform this task using for loops, I feel that there must be a more
2007 Feb 28
5
How to use find_options in multi_search
Hello everyone,
I''m using multi-search to search in some attributes of two classes. One
of the attributes is the id of the customer. For each multi_search I
want to do a give the id of the current customer as a parameter. This
should only return results for the given customer.
My current code looks like this:
Folder.multi_search(@search_query, [Myfile])
I noticed in the API you can
2013 May 28
2
Re: Fwd: Does Set Block IO tune take effect in the same session.
On 27.05.2013 12:36, vikrant verma wrote:
> Hello Michal,
>
> I am using the following code -
>
> virDomainSetInterfaceParameters(dom, "vnet0", networkParainfoPtr,
> nparams,0);
>
> before calling this i am assigning the following Inbound values
>
> inbound.average = 10 (10 kbps)
> inbound .peak = 10
> inbound.burst = 10
I suspect this way too