similar to: Migrating Data from Many Databases to One

Displaying 20 results from an estimated 6000 matches similar to: "Migrating Data from Many Databases to One"

2006 Jun 05
2
When adding a record in console, a parameter comes in as null even when I set it
In console, I am trying to create a User but the :account_id does not come in. Console just gives me back :account_id => nil. Obviously I''m trying to set it though. Silly console... But, I can set the account_id column in my controller like so: @user = User.new(params[:user]) @user.account_id = account.id @user.save Here''s what I give to the controller: User.create :name
2006 Jan 11
3
How do you do a custom sql call in rails?
Hi. I am developing an industry specific crm that allows busineses to track customers in a particular way. Each customer will be assigned a customer number. The first customer will have a customer number of 1, the second customer_number = 2, etc... Note that this customer number is not global but particular to the account that created the customer (see schema snip below). I need to have a
2010 Dec 02
8
CanCan issue when being very specific
So I got CanCan and Devise working well. I have two types of users: Admins and Nonadmins. Admins can edit all of Nonadmins profiles. The problem is, every user (either Admin or Nonadmin) belongs to an Account or Organization. Admins should only be able to edit users from their own Account or Organization. I was able to do that too. The problem is, I can''t display the Create New User
2009 Nov 27
2
update_attribute does not update
My server is running Rails 2.3.4...am I not doing this correctly or is something borked? >> c=Contact.last => #<Contact id: 24, name: "Larry", email: "larry-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org", phone: 2147483647, account_id: 8, created_at: "2009-11-27 18:16:25", updated_at: "2009-11-27 18:40:08", hide_name: false, hide_phone: false,
2006 Jun 19
3
Using set_primary_key breaks acts_as_tree with non-integer column
I just switched from using the standard "id" column into using my own primary key and generating my own unique id for each record. But, this breaks acts_as_tree. Because my new primary key is not an integer, it breaks the SQL query as follows: StatementInvalid in PagesController#create --------------------------------------------------------------------------------------
2008 Nov 12
5
dynamic condition for has_one and eager loading issue
Hi, I ve defined the following relation in one of my models with a dynamic where condition: has_one :selection, :foreign_key => ''object_id'', :conditions => ''selection_type = 1 and account_id = # {self.send(:account_id)}'' That works perfect, however when I try to eager load that relation I am getting the following error when doing a
2005 Jun 06
1
Samba domain an many sites
Im going to install a samba domain at 4 of my sites but I trying to take of the best way to do this. going to have siteA, siteBm, siteC, and siteD. There will be an ipsec between all sites. In the past if i had to do a setup like that would to a box at each site and from there I would make rsync the samba passwd file to all the sites to keep logins in sync. Is there a better ways to to this?
2007 Dec 04
1
spec''ing shared controller methods
I want to isolate and spec methods that are shared by controllers, and live in application.rb. Whereas I usually also provide examples in individual controllers that use these methods, not necessarily all the edge cases and I''d like to isolate the examples. This is the approach I''m taking (thanks to bryanl for suggestions and http://pastie.caboo.se/123626). WDYT? This
2008 Jul 16
2
belongs_to causing endless loop on first call to save!
Hi, I have a situation I''m hoping someone out there may be able to shed some light on. I have a Rails app (2.1.0 on Ruby 1.8.7) with a wizard-based sign up process, that has recently been changed from storing incremental data in the database to having a medium sized object graph living in the user session until the user completes the entire sign up process (this is a business
2007 Dec 02
1
total_hits and conditions
Hi. I''m running 0.11.4. The problem I''m having, appears to have been solved before according to various posts I googled up, but possibly the fix got removed from 0.11.3 to 0.11.4? re = Entry.multi_search(''service'', [Ticket], options, {}) re.size 620 re.total_hits 620 Now add conditions: re = Entry.multi_search(''service'', [Ticket],
2009 Aug 04
1
Output XML to File
I am trying to read some information based on a user id, then search the database for the needed info and build an XML file. Everything seems to be working fine; I read the info, I create the xml and even spit "stuff" out to file. The issue is that the "stuff" I am writing to a file is a xml/html cross cluster #@%$ of stuff. Here is some code: if !params[:id].blank?
2012 Sep 02
1
to_model
There''s a number of calls in the Rails source to convert_to_model, which takes an activerecord object instance: convert_to_model(object) Here''s the thing. All convert_to_model does is calls to_model, which returns self (the ActiveModel instance). Am I missing something here? Why call a method that returns the same thing? @user => #<User id: 3, name:
2006 Jan 06
6
HABTM problem not saving all associations
Hello all, I have an Order object that has and belongs to many Products and has and belongs to many Loan Types. This is so I can select multiples of each in my order entry screen via checkbox groups. I''m having some trouble with saving multiple HABTM associations for a single model object; only the first HABTM association declared in the model will save during the initial @order.save
2009 Jan 28
3
Newbie question about "grouping"
Hi folks: I am a SQL guy who just downloaded and installed R yesterday. I am trying to evaluate some "complex" aggregations we are currently performing with Syncsort (and have tried in Oracle) with R. I have loaded data in a dataframe and have performed some of the simple aggregations on a subset of data. What I do not see how to do though, is to "group" the aggregations
2007 Jul 09
3
NoMethodError when using find_by_sql
I''m try to verify users on login. Here is my code: def self.authenticate(username,password,account_code) employee = self.find(:all, :select => "e.id, e.first_name, e.last_name, e.username, e.account_id, e.department_id, o.pay_type_id, o.admin_yn, o.payroll_yn, o.files_yn, o.dept_report_yn,e.salt, e.hashed_password", :conditions => ["e.deleted_yn=0 and
2006 Jul 19
2
Creating a safe sequence generator
Hi all, I''ve got a rails and database question. Accounts have jobs, and job numbers should be assigned per account. Account 89 should have jobs 1-whatever, which are not the same as account 67, which has jobs 1-whatever. In the past, I have accomplished this quite easily with: create table job ( accountid int(10) unsigned not null default 0, jobid int(10) unsigned not null
2006 Jul 03
4
Display find(:include => [:children]) results in a view
I am trying to determine how to display a list returned from a Rails find(:include => [:children]). I am using the following (which works in the console): @patients = Account.find(session[:account_id]).patients.find(:all, :include => [:patient_details]) How can I address the patient_details to display them in the view? The console even shows a @patient_details instance variable
2006 Jan 05
3
has_one :dependent => true question
Hello, I have two classes that are self explanatory and are listed below. class User < ActiveRecord::Base belongs_to :account end class Account < ActiveRecord::Base has_one :account_owner, { :dependent => true, :class_name => "User", :conditions => "is_account_owner = 1" } has_many :users end In the signup controller when an account is created one user
2006 Feb 23
5
Access to session from plugins
Hi! I am writing an acts_as_ plugin and i need to access session data from it. But i cant find any information if this is possible? And if it is, how. Cheers! Mathias
2016 May 25
4
Upgrading Samba 3 to Samba 4 with Active Directory at many sites
First, background information. We are a large (geographically local) organization with 50 sites, including our HQ. Each site has a Debian Server running Samba in NT-Domain Controller mode. Each site is independant of the next, but are all named <SITE>.example.com. The workstations are connected, and working fine in our sites with the single servers. We had a recent network upgrade that now