Displaying 20 results from an estimated 2000 matches similar to: "Custom Primary Key, Using Primary Key in Form gives "before_type_cast" error?"
2006 Jun 13
2
Custom Primary Key, Using Primary Key in Form "gives before_type_cast" error?
Hi guys,
I''ve got a problem here which i need help from the pro''s in this mailing list
I have a legacy app where the User table has a custom structure where
"User_id" (username) is the primary key as well as the username used
to log in
User.rb (model)
class User < ActiveRecord::Base
set_table_name "cmf901"
set_primary_key "user_id"
end
2008 Jan 16
4
ActionController::InvalidAuthenticityToken in LoginController
Hi,
I''m having a problem trying to get a login controller working. When I
try and post to my login controller I get the following error:
ActionController::InvalidAuthenticityToken in LoginController#login
login_controller:
class LoginController < ApplicationController
def login
case request.method
when :post
if @session[''user''] =
2006 Feb 28
0
ActiveRecord: Legacy primary keys
Hi,
I''m building a frontend for a legacy schema, with tables like this:
CREATE TABLE `types` (
`a_type_cd` varchar(6) NOT NULL default '''',
`a_type` varchar(30) NOT NULL default '''',
PRIMARY KEY (`a_type_cd`)
);
The primary key is specified by the user (not auto-generated), and needs
to be updateable. I create the following a base class to
2007 Jan 09
0
Production Mode with SCGI
Hi,
I have an application running on Apache SCGI (Win XP). Once I run it in
production mode (scgi_ctrl config -S -e production ) I''m getting
stack trace instead of HTTP status 500 (Application Error) and the
error is logged production.log. The application works fine without
SCGI. Your help is highly appreciated....
Thanx
/* production.log */
# Logfile created on Thu Jan 04 16:35:43
2003 Aug 15
0
Re: [R} stars graphs
I thought about that star graph again, and realized that it would be quite
a handy thing for visualizing cyclic data like time or compass direction.
Here is a cleaned up (and renamed) version to do a polar plot that starts
at the right and goes counterclockwise or a 24 hour clock plot that starts
at the top and goes clockwise. There are probably other varieties that
would be interesting.
Jim
2010 Aug 19
1
Composite primary keys and :joins=>
I have a legacy db with the following simplified structure:
Table-A:
type_key, code_key, name, ... # PKs are type_key and code_key,
there is no id col and I cannot alter this db
Table-B: # each row has only the code as a foreign_key, the type_key
is hard-coded to "FOOKEY"
an_id, code, ...
Models:
class TableB < AR::Base
set_table_name ''table_b''
2005 Nov 19
1
How I provide a session object to Functional Tests?
People,
I''m looking at p. 152 in the Rails book where he talks about testing
controllers [ functional tests ].
First he shows a method, test_login_with_valid_user, which tests
that it''s possible to login with a valid user/password combo.
Then, he talks about extracting the code he just wrote and placing it
into a login method inside of test_helper.rb
Once the method is there,
2009 Nov 06
0
Nested objects not propagating from view
I thought I had this fixed, but apparently not. It works okay from the
console, but not from the view. I have the following:
# partial schema
create_table "users", :force => true do |t|
t.string "login", :null => false
t.string "first_name"
t.string "last_name"
t.string "email", :null => false
2009 Apr 03
2
Problem with spacing
I''m having the devil''s time trying to get things laid out correctly.
I''ve attached a screenshot so that you can get an idea of what I''m
seeing. I''ve got a very unattractive space under the two combo boxes,
and another one under the buttons. I don''t understand how to reduce
this.
I know it''s impossible to guess what idiocy I might have
2007 Aug 31
2
Give focus to an input field of a form
Hi,
I am new to rails and I have setup Typo on my site. One little
thing bugs me, the login page doesn''t give focus to the "user_login"
field. I was wondering what do I need to do to make rails help with
this? I have seen some simple inline javascript to set the focus,
sort of like:
document.<form_name>.user_login.focus()
However the rails view doesn''t
2012 May 01
1
uninitialized constant LoginController in Ruby
This is my environment.rb
# Load the rails application
require File.expand_path(''../application'', __FILE__)
# Initialize the rails application
Qstack::Application.initialize!
require ''koala''
This is my application_controller.rb
class ApplicationController < ActionController::Base
# protect_from_forgery
before_filter :parse_facebook_cookies
def
2007 Nov 18
2
Variable inside of another variable
Hi everyone,
I''m building partial and I need to use a variable inside of another
variable name:
I''ve tried like this:
<div class="form_row">
<label for="<%= field %>"><%= field_title || field.humanize %>:</
label>
<%= form.text_field field,
:size => User::field.upcase_SIZE,
2012 Oct 02
1
ffsave problems
Dear R friends.
After having some troubles learning how to create a ffdf object, now I find
myself having problems saving it.
this is the data i´d like to save:
str(DATA)
List of 3
$ virtual: 'data.frame': 6 obs. of 7 variables:
.. $ VirtualVmode : chr "double" "short" "integer" "integer" ...
.. $ AsIs : logi FALSE FALSE FALSE
2006 May 10
3
AJAX reload
Ok I stole some script and I need some help on fixing it on one thing:
Reloading on post.
here''s the script:
<div id="panel">
<form action="/loging_in/login" class="header-panel"
href="/loging_in/login" id="login-panel" method="post" onsubmit="new
Ajax.Request(''/loging_in/login'',
2007 Apr 20
0
Problems with the Speex Jitter Buffer
(Sorry about the delay -- currently attending ICASSP)
Hi,
Haven't looked at all the details, but what's clearly wrong is that you
need to put the *compressed* packets in the jitter buffer and decode
them only when you _get() them.
Jean-Marc
David Feurle wrote:
> Hi,
>
> I am using the JitterBuffer. Since there is not so much documentation I
> think I dont use it in a
2007 Apr 20
0
Problems with the Speex Jitter Buffer
David Feurle wrote:
> Thanks for your reply Jean-Marc!
>
> this was what I had before.
> But I decided to restructure it since the thread that plays the sound is
> a callback from the sound hardware, more or less an interrupt handler.
> For me it seems more reasonable to waste some memory for to save the
> decompressed Packet. While I write this I begin to think that it is
2010 Jan 10
1
xmlToDataFrame#Help!!!#follow-up
Dieter Menne pointed out that the (small) xml attachment didn't make it.
Here is an in-line version (see end of message). Let's hope it works
this time.
I'm struggling with interpreting XML files created by ADODB as
data.frames and I'm looking for advice.
Note:
This xlm contains a result set which comes from a rectangular data
array. I've been trying to play with
2007 Apr 18
3
Problems with the Speex Jitter Buffer
Hi,
I am using the JitterBuffer. Since there is not so much documentation I
think I dont use it in a correct way. All the packets are recieved (I
control the sequence numbers) but the JitterBuffer often tells me he has
no packet. I am using it in the following way:
I am not sure if I use the ticks correctly but I think it can be set to
20(msec).
It is set as a Member in my class and i
2007 Apr 20
2
Problems with the Speex Jitter Buffer
Thanks for your reply Jean-Marc!
this was what I had before.
But I decided to restructure it since the thread that plays the sound is
a callback from the sound hardware, more or less an interrupt handler.
For me it seems more reasonable to waste some memory for to save the
decompressed Packet. While I write this I begin to think that it is
possible I decompress Packets that are never used
2009 Nov 23
1
xrcise not working
Hi. I''m back. Unfortunately I can''t get xrcise working. Here is the
sample xrc file and the resulting error messages:
=============== TestWxFb.xrc =========================================
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<resource xmlns="http://www.wxwindows.org/wxxrc" version="2.3.0.1">