similar to: thsi is my first question

Displaying 20 results from an estimated 5000 matches similar to: "thsi is my first question"

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
2006 Jan 02
19
AR: How to store and restore in YML.
Hello- I have a database with entries that are segmented by customers. I would like to be able to store / delete / restore a particular customer''s information. I will need to rebuild the rows on restore and also rebuild the associations for the different tables. For example, customer { id name } companies { id customer_id (belongs_to) name } contacts { id
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/.
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/.
2005 Nov 20
1
mySQL 5.0 upgrade - incompatible DateTime format?
I''ve upgraded to mySQL 5.0, and it''s gone pretty smoothly except that on DateTime.now doesn''t seem to return a value that mySQL likes any more, as seen in the following exception: Incorrect datetime value: ''2005-11-20T15:33:12-0800'' for column ''logged_at'' at row 1: UPDATE notes SET `due_on` = ''2005-11-20'',
2006 Apr 26
1
Bug in validates_associated?
Here is the setup: Windows XP, InstantRails, MySQL 14.7, Ruby 1.8.4, Rails 1.1.2 MODEL: class Office<ActiveRecord::Base has_many :users end class User<ActiveRecord::Base belongs_to :office validates_presence_of :office_id validates_associated :office <....other stuff...> end UNIT_TEST test/unit/user_test.rb def test_associations u = User.new u.office_id =
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
2003 Oct 13
1
Ignore purge and delete command
Hi, Does anyone know how to ignore the purge or delete command from the imap clients. Actually I created a mail archive and using dovecot and so far I am happy with the performance. But the problem I am facing right now is I do not want the users to delete the mail by themselves and want to disable the purge or delete command. Thanks Vikrant
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
2006 May 19
1
ActiveRecord: Minor saving problem
This is probably a very stupid error on my side, but I am doing my first steps now and I don''t see what is wrong. I have companies and I have users. A user can create a company. When the user does he''s automatically a member of the company. A company should be able to have multiple users off course so every member of a company can add other users who don''t have a
2006 Aug 14
6
Testing fails with fixtures not when invoked directly
I have three files organization.rb, company.rb, and department.rb. I want to ensure the department always has a company require File.dirname(__FILE__) + ''/../test_helper'' class OrganizationTest < Test::Unit::TestCase fixtures :organizations def setup @smo = organizations(:smo) end def test_department_company_defaults_to_parent org = Department.new(:name =>
2014 Apr 11
0
Rails 4.1 activerecord_relation conversion to array problem
After I upgraded from rails 3.2 to 4.1 I am getting this error below. I researched that Rails 4.1 requires a conversion of an activerecord_relation to an array using to_a. I did use to_a but looks like rails is doing a select count behind the scenes. Do you know how to fix this? def index order_type = params[:order_type] @oh = OrderHeader.select("orders_header.*, users.username,
2007 Jan 24
2
A spec where interaction-based testing breaks down... (at least for now)
Here are the specs: context "Finding all the stylesheets available to a company" do setup do @mock_company = mock("company") @mock_company.stub!(:to_param).and_return "1" Stylesheet.stub!(:find) end def do_find Stylesheet.find_available_to @mock_company end specify "should convert the company into a parameter" do
2007 Jan 08
1
Realtime Voicemail Table Column Name Question
Hi All, In the realtime voicemail table the column 'customer_id' is used, for my purpose, to specify the customers accountcode. The column name 'accountcode' is used in the iax and sip tables. To keep this consistent throughout the tables, is there any reason I should NOT switch the column name 'customer_id' to 'accountcode' in the voicemail table? Does Asterisk
2009 Mar 17
1
Route failure with Rails2.3 and rspec1.2
Hello all, I have a spec for a route that used to pass under Rails 2.2.2 and rspec 1.1.12, but can?t figure out what is wrong since I updated. Here is the assertion: route_for( { :controller => ''purchase_orders'', :action => ''update'', :company_id => "32", :id
2013 May 31
1
Re: Fwd: Does Set Block IO tune take effect in the same session.
On 31.05.2013 07:05, vikrant verma wrote: > Hello Michal, > > Throttling is working now after setting inbound.average = 10 (i have > set other values to 0 ) > But i am observing an inconsistent behavior in the observed throttling > bandwidth > > when i set inbound.average = 10 , i observed bandwidth of 24 kbps > when i set inbound.average = 100 , i observed
2007 Sep 21
2
ActionWebServer and SOAPFault
I''m really new to RoR and my first task is to write SOAP web service. The problem is that I don''t understand how to send custom SOAPFault messages in case of the errors. For example, I have FindCustomerById API signature: api_method :find_customer_by_id, :expects => [{:customer_id => :int}], :returns => [Customer] And controller: def
2009 Sep 25
1
Java to R interface.
I want to call R functions from Java. I read a couple of forums that said to install package rJava in R. However I am not able to install rJava package in linux Ubuntu.I tried with two commands. One is install.packages("rJava") and another I downloaded the rJava_0.7-0.tar.gz file from R site. and gave the command R CMD INSTALL rJava_0.7-0.tar.gz. I got the followin Errors :- Warning
2006 Jul 31
0
MY worker won''t stop working
> On Jul 30, 2006, at 5:11 PM, Chris H wrote: > >> Hi Ezra, >> >> thanks for the reply. >> >> There''s a ruby process that appears in top when I fire off the do_work >> method. >> It uses around 30-50% cpu and disappears once all processing has >> completed. >> >> When I try to stop processing using delete_worker I was
2006 Mar 30
6
MS SQL query strangeness for ActiveRecord in Rails
Hi, I am currently trying to move my rubyonrails app from Linux to Windows server utilizing MS SQL instead of MySQL due to "business" reason. All my listing screen utilize a drop down list in each column to allow user to "filter" the listing based upon the value chosen from the drop down list. In the controller, I used find() method but with customized parameters such as