similar to: database design help

Displaying 20 results from an estimated 3000 matches similar to: "database design help"

2006 Jan 19
3
Migrating from Mysql to PostgreSQL
I tried to use ''rake db_schema_dump'' from old MySQL database and then use ''rake db_schema_import'' to rebuild the database in PostgreSQL. The issue here is that only some of tables can be imported successfully. For example, in the dumped schema.rb: create_table "profiles", :force => true do |t| t.column "ticker", :string, :limit
2011 Feb 17
1
RCurl HTTP Post ?
According to [1] and [2], using RCurl to post a form with basic authentication is done using the postForm method. I'm trying to post generated interpolation data from R onto an HTTP form. The call I'm using is page <- postForm('http://our.server.com/dbInt/new', opts = curlOptions=(userpwd="test:test", verbose=T), profileid = "-1", value="1.801",
2006 Apr 22
7
Proper Database Design For A Newbie
Hi all, I am starting out learning Ruby on Rails (coming from a PHP background) and I have a question about proper database design. Let me give you a quick example of what I want to do: Database: CREATE TABLE `users` ( `id` int(11) NOT NULL auto_increment, `login` varchar(40) default NULL, `email` varchar(100) default NULL, `crypted_password` varchar(40) default NULL, `salt`
2011 Feb 16
1
Rjdbc dbGetquery execution error
Rjdbc consistently gives me an execution error with postgresql 9.0s JDBC4 driver. It's probably something trivial so am including my code below: library("RJDBC") param <- 249 param2 <- 188129 postgres <- JDBC("org.postgresql.Driver", ".m2/repository/postgresql/postgresql/9.0-801.jdbc4/postgresql-9.0-801.jdbc4.jar") con <- dbConnect(postgres,
2008 Sep 16
3
has_one :through eager-loading problem
I have a problem with the :include option in find for my has_one :through association. I have Users, Profiles and Customers, all connected to each other with a has_one :through => :membership association like this: class Profile < ActiveRecord::Base #could also be user or customer has_one :membership # i saw an acrticle of Ryan about has_one :through, there this would be has_many, is
2010 Aug 16
8
Executing js.erb file with :format =>'js'
Hi, I''m trying to get my javascript to execute after clicking a link on my page using :format => "js" here''s my link: <%= link_to image_tag("/images/icons/user_add.png"), add_contact_path(:profile_id => profile.id, :url => request.url, :format => "js"), :title => "Add person to your contacts"%> in my controller i have
2007 Jul 18
3
Help. Acts_as_Authenticated plugin stops working for me?
Hi, I successfully installed AAA couple days before, and i managed to register a uer with it, with no user activation. but for some strange reason, it stops working for the signup method, with i go to the signup page, press submit, it shows an error page, what''s wrong? here''s the error page. undefined method `activation_code'' for #<User:0x3b6dbd
2012 Sep 23
0
VLANs with Open vSwitch in libvirt 0.10.1
Hello all, I'm trying to take advantage of libvirt's VLAN and OVS support in the 0.10.1 release and consistently getting an "error: internal error corrupted profileid string" when starting a guest. I've defined a network using virsh; the configuration looks like this: <network> <name>ovs-network</name>
2007 Nov 17
18
Syntax Problem
I admit I am stuck. I am converting a legacy php site to ROR. The old site uses MD5, a security flaw waiting to happen. I upgraded to AAA and am adding code in the session_controller.rb file to see if crypted_password is blank. If it is, crypt and check the password against the old md5 version and write it in the new crypted_password field. Here is my code add on before the logged_in?: def
2009 Nov 14
3
authlogic fails on existing accounts when crypted_password is blank
I recently ran a migration to add the following to an existing user model: t.string "crypted_password" t.string "password_salt" t.string "persistence_token" There is an existing (cleartext) password field, but authlogic doesn''t seem to be reading that on existing accounts. As a result, all logins for existing accounts fail. How can I get
2012 Apr 12
2
help:any docs for open vswitch supporting?
hi everybody, i saw the new feature: network: support Open vSwitch. how to use this feature? are there any documents about that? i didn't find it on the website. Thanks, Heuye -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20120412/1d61864c/attachment.htm>
2008 Jun 20
15
before_save model callback rspec testing
hi all, i''m learning rspec and i can''t figure out how to test if a callback is executed in a model. my model code is: class User < ActiveRecord::Base before_save :encrypt_password ... def encrypt(password) self.class.encrypt(password, salt) end thanks a lot, cs. -- Posted via http://www.ruby-forum.com/.
2006 Apr 26
1
Possible acts_as_authenticated bug (or rails)
The code that comes with the plugin uses a method that looks like this: def password_required? crypted_password.blank? or not password.blank? end with validations that look like this: validates_presence_of :password, :if => :password_required? validates_presence_of :password_confirmation, :if => :password_required? validates_length_of
2007 Aug 30
1
belongs_to with foreign keys that reference non primary key columns
Hello, I have a situation where the foreign key into a table doesn''t correspond to that table''s primary key: my_table ------------- id (pk) name ... other_table -------------- id (pk) my_table_name (fk references my_table(name)) ... I want to be able to say something like: class OtherTable < ActiveRecord::Base belongs_to :my_table, :foreign_key => { :my_table_name
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
2010 Feb 04
2
Encrypt a user password using "Authlogic"
Hi, I have a csv file which have the user detail. I want to migrate this information into the "users" table. My application use "Authlogic" for user aunthentication so I have to encrypt the password during migration. I have written the script which is reading the csv file and adds the record into "users" table, it is working fine. But I am not able to encrypt the
2012 Mar 22
1
Rspec not loading fixtures
I am taking over a code base and am trying to run the tests. I am somewhat new to RSpec so this might be a trivial problem. Basically I can tell that the fixtures are not getting loaded. All 100 tests fail with a similar error. But I don''t know why. Below is the code, with my narrative with *** before it... Can you see anything or give me a clue where to look. So far I am coming up
2008 Jun 29
3
Working around/with Restful Authentication
I''m using Restful Authentication, and the code to create a user is pretty straight forward - there is a before_save action and a before_create action: before_save :encrypt_password before_create :make_activation_code But for some reason when I try to create a user programmatically in the controller like this: User.new(:email =>
2006 Apr 19
6
undefined method `create_table'' for #<LoginController:0x5e60
I am geeting the foolowing error. undefined method `create_table'' for #<LoginController:0x5e60110> I wrote the crete action in application controller. I am coping ther total worng please help me! class ApplicationController < ActionController::Base model :cart model :line_item before_filter :authorize def create # create_table() yields a TableDefinition instance
2008 Sep 08
2
Restful Authentication and State Machine state transfer question
I''m adding some code to a project using restful_authentication and acts_as_statemachine In the create method for a user there is the following code generated by the restful_authentication template @user.regster! if user.valid? And this will save and the user record if it is valid. I understand that the statemachine will then change the state from passive to pending. It will guard