search for: user_details

Displaying 9 results from an estimated 9 matches for "user_details".

2006 Aug 08
3
Database transactions
Hello, I have an application where I need to create two records in a database transaction. ie: begin User.transaction(user) do User_details.transaction(user_details) do user.save user_details.save end end end rescue flash[:notice] "Insert rolled back... but why..??" end >From reading the Agile book, I gather that once I wrap the request in a transaction I loose the validation state,...
2006 Feb 27
1
Functional test problem with environments variables
Hi guys, i have been experiencing this problem once i put in some constant declarations in /config/environments/development.rb. I declared it very normally like this : USER_DETAILS = { :name => ''abc'', :password => ''123''} it works in the controller and when i run the application, i managed to get the values out from the development.rb by using some statements like @user = [''USER_DETAILS''].name. But when i code the...
2006 May 23
0
Noob: Validation Errs Don''t Display When Saving Object Tree
I''ve got the following model: User < AR::Base has_one :user_detail UserDetail < AR::Base belongs_to :user has_one :address Address < AR::Base belongs_to :user_detail I''ve a form to gather the data, and it includes partials for each class. Each partial has an error_messages_for ''class'' snippet which should display the errors relevant to
2006 Apr 16
5
Granular model validation based around controller actions?
How can I achieve granular control over the validation for different controllers? I create users from an administration controller, but I don''t want to fill in all their information fields, just have their name and email address. When they accept the invitation, I want to implement validation on the other fields. I have looked at using :on => :update, but I would have to make the
2006 Jan 11
7
Create a relationship with 2 or more tables on 1 insert
userstable: |id|name|password| userdetailstable: |id|col1|col2|col3|user_id| this is my code: [code] def create @user = User.new(@params[''user'']) @userdetail = Userdetail.new(@params[''userdetail'']) if @user.save and @userdetail.save flash[:notice] = "Save succeeded..." redirect_to :action => ''list''
2005 May 08
3
sqlite, views, incorrect data types?
This has been driving me crazy for a few days now. I am using sqlite3 however I have also found this to be the case with 2.8.15: I have data types text or integer on every column of every table in the database. Now i know sqlite doesnt care much about data types, but I believe rails does (correct me if im wrong). On pages that query a table, everything is perfect. BUT when I use a view
2005 Mar 31
4
Transactions
I cant seem to find much information apart from the basics on transactions in rails. I have 5 nested transactions, and am performing the following basic operations: @whatever1.transaction do @whatever2.transaction do .... @whatever2.something = "foo" @whatever1.something = "bar" @whatever1.save @whatever2.save ..... end end ((( I had tried using
2009 Sep 15
1
R Memory Usage Concerns
...-- 1 evan evan 63M 2009-07-08 20:56 20090708.tab [evan at t500 ~]$ head 20090708.tab spice 1247036405.04 0.0141088962555 spice 1247036405.01 0.046797990799 spice 1247036405.13 0.0137498378754 spice 1247036404.87 0.0594480037689 spice 1247036405.02 0.0170919895172 topic 1247036404.74 0.512196063995 user_details 1247036404.64 0.242133140564 spice 1247036405.23 0.0408620834351 biz_details 1247036405.04 0.40732884407 spice 1247036405.35 0.0501029491425 [evan at t500 ~]$ wc -l 20090708.tab 1797601 20090708.tab So it's basically a CSV file (actually, space delimited) where all of the lines are three colu...
2006 Sep 01
2
Mrelation does not exists
Hello! I''m having the following error: RuntimeError: ERROR C42P01 Mrelation "subjects_users_id_seq" does not exist Fnamespace.c L200 RRangeVarGetRelid: SELECT currval (''subjects_users_id_seq'') when I try to do: subject= SubjectsUser.new(params[:subjects_user]) subject.save The models: class User < ActiveRecord::Base has_one :last_entrie has_one