Displaying 20 results from an estimated 3000 matches similar to: "rails temporary table?"
2006 Jan 14
11
accessing models from migrations
Ok, so now Users need to be associated with Organizations. I''ve
created a migration and added a ''organization_id'' column to the users
table. I want the default organization_id to be the first
Organization. So I have :default => Organization.find(:first). But
it''s complaining about not being able to find the constant
''Organization''.
Any
2006 Jan 09
5
Paypal IPN - unable to access breakpoint during POST?
Hi all,
I''m trying to debug some code in my paypal instant payment notification
action.
Why can I not access the breakpoint placed inside the action that paypal
POSTs to? It just doesn''t find the server, but it works fine when placed
inside other actions.
I''ve appended the code to the end of this post.
Thanks everyone!
Tom
--
def paypal_ipn
notify =
2006 Jan 17
6
database.yml and remote mysql database
I can''t seem to connect to a remote database. Here is what I''ve tried.
the database,username,password, and host have been changed to protect
the innocent.
development:
adapter: mysql
database: database
username: username
password: password
host: host
port: 3306
Here is the error
/usr/lib/ruby/1.8/yaml.rb:133:in `load'': syntax error on line 11, col 2:
`
2006 Aug 05
5
error with db:migrate
I''m new to ROR, and am working my way through the Agile Web Development
Book. In the test application, the authors tell me to test my database
connection by performing "rake db:migrate".
When I do, I get the error "Don''t know how to build task ''db:migrate''"
I''ve been looking around at the files, and I see a reference to a
2006 Jan 19
4
multiple database in the same actions?
Hi,
I read the example in
http://wiki.rubyonrails.com/rails/pages/HowtoUseMultipleDatabases,
it show us how to connect to other database, each time
we start a new action, however, this doesn''t work
while you try to connect to two different database
within the same action.
SO I wonder is it possible to bind to two or more
database within the same action????
Thanks you very much
Saiho
2006 Jan 12
3
what about Austin railers?
If Tuscon has some rail users, I know there must be some other Austin
railers out there. Have I missed some meetings that I didn''t know about?
Steve
http://www.smarkets.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060112/c2723541/attachment.html
2006 Mar 01
5
rails models, logging and testing
Hello,
I am using rails 1.0 and I have following questions. Please help me.
[1] How can I do logging in the rails models? I checked the wiki but didn''t find
anything which I explained how to do logging in models.
[2] Say I have a certain model, when I declare a function in the model, and
try to use that function from a view or a unit test, I get an error. For views
the error occurs
2006 Aug 05
5
rake migrate error: nil.first
My migrations were working fine until today. I dropped and re-created the
database.But, when I go to apply my migrations, rake migrate aborts with
this error.
You have a nil object when you didn''t expect it!
You might have expected an instance of Array.
The error occured while evaluating nil.first
Any idea what might be wrong? The migrations look right. It''s talking to
the
2006 Jan 01
11
Migration db_schema_import always fails.
I have not been able to get DB migrations to work at all in Rails 1.0
for me. On multiple platforms I continually get the same errors. It
took me awhile to figure out some initial things, such as Migrations
don''t seem to support Enum column types, and doesn''t really support
Foreign key relationships (the constraints at least). After changing
my DB schema to jive more with the
2009 Jan 16
3
rspec model testing - test on user defined validation- How do I test that the create failed.
I''m new to rspec and looking for way to test a validation I added to a model.
The test checks to see that if field1 has a value then field2 must be nil
and vice versa.
-------------------------------
When I did the rspec_scaffold it generated one test which worked
before :each do
@valid_attributes = {
:field1 = "value for field1"
:field2 = "value for
2006 Aug 10
4
I need "validates_presence_of" help
Hi - I have 3 fileds a user can fill out. They can fill out 2 of them or
just one of them, for example.
fill out these 2 fields:
Field1 and Field2
Or fill out this field:
Field3
In my model how do I use validates_presence_of for Field1 and Field2 or
just Field3.
I want to do something like this:
validates_presence_of Field1, Field2
OR
validates_presence_of Field3
So the user can fill out
2006 Mar 01
5
single transaction migrations
Hi!
It seems that migration doesn''t use single transcation to execute the
needed migrations for the database upgrade, so if I have database at
version 5, and I wrote some migrations 6..10, and error occurs while
executing migration 7, the database stays in state 6?
I also think that migration taks could use some more verbosity, for
example if migration fails, there''s no
2006 Jan 13
4
How to add virtual fields in model
I want to add virtual fields in a model.
table: field1 field2
I want to add field3 which is field1*2 + field2
I know tihs can be achieved in View, but I want it in model.
Then I will pass this model to PagerRenderer to paginate.
How to achieve this?
thanks
--
Posted via http://www.ruby-forum.com/.
2008 May 29
2
how to use substring match as condition?
Hi,
How can I use a substring match as a condition in a subset command?
Sth like this:
subset(input, field1=="blah1" & field2=="blah2") # but now with substring
match in field2
subset(input, field1=="blah1" & field3 *substringmatch* "blah3")
I've tried with gsub, but it won't work:
subset(input, field1=="blah1" &
2009 Aug 15
4
How to use R to perform prediction based on history data
Say I have a csv file, each row contains several fields, one of them
are whether the row is success.
In history data, I have all the fields including the result of whether
it is success. In future data, I only have fields without the result.
For example:
history data:
Field1 Field2 Field3 Field4 ResultField
1231 CA TRUE 443 TRUE
23231 NC TRUE 123 FALSE
2006 Mar 21
1
Form Validation
Hi,
I''ve got an interesting one here :)
I have a form with three fields :
serial_number
initial
surname
now, if serial_number is entered, it must be between 1 and 64000. If
it''s filled in, the other two fields must be blank. If serial_number is
left blank then the other two boxes must be filled.
Any suggestions?
--
Posted via http://www.ruby-forum.com/.
2005 Dec 30
2
help on submit_to_remote
hi,
read the API doc and made search with google but can''t get a precise
explanation on how submit_to_remote work.
can someone help on that?
thanks
2007 Jul 16
2
Field initialization order bug?
I believe that I may have found a bug in R. The top code sample gives
an error as shown. However, by simply switching which field is
initialized first as in the bottom code sample, it works as expected.
This gives an error:
a <- NULL
a[["field1"]] <- 1
a[["field2"]] <- matrix(c(2,1), 1)
Error in a[["field2"]] <- matrix(c(2, 1), 1) :
more elements
2007 Feb 17
1
Conditional data frame manipulation
Hi all,
My current project brought forth the snippet below, which modifies in each
row of a data frame a certain field depending on another field in the same
row. Dealing with data of some 30000 entries this works, but is horribly
slow. Can anyone show this newbie how to do this properly (faster ;0)?
for (i in 1:nrow(dataframe)){
if
2007 Feb 23
2
bug with boolean query evaluation containing parenthesis and NOT ?
Hi,
The following [simplified] query works well, however a variation which
includes parenthesis seems to fail, in that it returns hits which should
be excluded by the NOT term.
This is surprising because in this simple case, the parenthesis
shouldn''t change the Boolean evaluation ... any pointers?
Working Query: field1:value1 AND NOT field2:value2
Failing Query: field1:value1 AND