similar to: [newbie] Redundant SELECTs?

Displaying 20 results from an estimated 110 matches similar to: "[newbie] Redundant SELECTs?"

2005 Dec 17
1
lost in an ActiveRecord::StatementInvalid
I have an error I don''t know how to debug. I am adding the login suport in Depot (the example in the RoR book) and LoginController#add_user throws ActiveRecord::StatementInvalid in an innocent /login/add_user GET request. The trace goes down to a call to SQLiteAdapter#table_structure, and the source code suggests what''s happening is that "PRAGMA
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
2010 Jul 16
1
sqldf modify table
Hi - I am something of a newbie and am a little perplexed. When (trying to) modify a table I issue the following commands with subsequent errors sqldf("alter table Korea drop column code", dbname = "mydb") error in statement: near "drop": syntax error or sqldf("alter table Korea rename column hyr to hyrI", dbname = "mydb") error in statement:
2006 Feb 08
1
Save only inserts null instead of actual values
Hi, whenever I try to save my form, rails only enters null values in my database. I''m using sqlite, I thought that sqlite might be the problem, but the problem remains when I switched to mysql. Here is my code: controller: class CollectionController < ApplicationController def new @collection = Collection.new end def create if request.get? redirect_to :action
2006 Mar 30
2
Functional test confusion
I have been reading about testing in RoR for what seems like hours now in search of the answer to what is probably a simple problem. Where is the best place to test the second action explained below? I have a controller (NetworkingController) with a method (create_network_segment) that makes use of two models (NetworkSegment and NetworkIpaddress). This particular method does two actions: 1.
2006 Apr 22
2
Question about functional tests and log/test.log
Here''s something a bit weird: After running functional tests, my test log contains many lines, including many like these: > Processing UserController#attempt_login (for 0.0.0.0 at 2006-04-22 > 02:38:08) [POST] > Session ID: > Parameters: {"user"=>{"password"=>"bogus", > "email"=>"tmornini@bogus.com"},
2010 Aug 27
2
phpMyAdmin can't connect to remote server
Hi All, I have had a thread about this going on the phpMyAdmin list for a little while. Nobody there has been able to shed any light on my problem. It seems that with phpMyAdmin I can not connect to remote servers. Though it also seems that apache, php and mysqli all work fine outside of phpMyAdmin. Below I have detailed my trouble shooting. This only seems to be an issue for me with CentOS 5 so
2005 Mar 04
17
active record logs format
Hi, I think this has already been asked on the list, but I can''t seem to be able to find it again: currently, active record does some weird thing with its sql logs i.e.: [4;33mSQL (0.000000) [1;37mPRAGMA table_info(map_locations) how do I remove the "[4;35m" thx Jean
2006 Mar 13
4
Find and eager loading questions
Hi all, I want to see if I''m not missing something with associations and eager loading. (I''m currently using Locomotive on OS X and SQLite3.) I have two simple tables/models, set up properly: teams has_many :matches and matches belongs_to :teams. Matches has a match number and a team_id field (along with several other fields) and teams has a team_number field (again, along with
2008 Aug 25
8
SQL Primer for R
Dear R wizards: I decided to take the advice in the R data import/export manual and want to learn how to work with SQL for large data sets. I am trying SQLite with the DBI and RSQLite database interfaces. Speed is nice. Alas, I am struggling to find a tutorial that is geared for the kind of standard operations that I would want in R. Simple things: * how to determine the number of rows in a
2006 Jun 14
2
Date as INPUT not Selects
Greetings! Can anyone tell me how to use just a normal input field as a date entry? I can use a text_field tag, but that brings the date out in CCYY-MM-DD format. I would like to be able to simply key in my dates like mm/dd/ccyy format. Thanks, Jeremy
2006 Jun 26
2
DRY up selects in view
Here''s what I''ve got: <% @fields.each do |field_name| %> <tr> <td> <%= field_name.humanize %> </td> <td> <% unless field_name =~ /_id$/ %> <%= form.text_field field_name, :size => 40 %> <% else %> <%= select(:vendor, field_name, State.find(:all, :order
2006 Apr 15
2
Sub-selects with Find
Is it possible to do sub-select queries with Find? -- Posted via http://www.ruby-forum.com/.
2006 Apr 27
3
How to create multiple selects with related content?
How to create such a multiple select box: the first box lists the countries, the second lists the states related to the country in the first select automaticly the third lists the cities related to the state in the second select automaticly Thanks -- Posted via http://www.ruby-forum.com/.
2005 Dec 05
0
Prototype Form.serialize and mutli selects
Hi, I ran into a problem when using a multi select list in a form submitted through ajax. The name of the select element is something like foo[]. When multiple entries are selected the browser creates form data like foo[]=1&foo[]=2&foo[]=4 (url encoded of course). Rails then creates an array ["1","2","4"] for foo''s entry in the parameter hash.
2006 Jan 15
0
HABTM relationships and retrieving multiple selects in controller
Hello all, I have a product table and an option table that are connected to one another via a join table. These two tables both contain has_and_belong_to_many relationships with each other. I am trying to setup a page where I will create a product and add in its options. I have already populated the options table with data to draw from. so, to start, here is the method from my controller: def
2007 Apr 20
2
Double URL Encoding of multiple selects (or any array in toQueryParams)
Hello, It seems that if you call form.serialize on a multiple select, and it double url encodes the values... culprit seems to be (v.1.5.0) line 649/650. It calls encodeURIComponent twice. -jeff --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send
2012 Apr 05
1
Username bug in '%%' variables selects
Hi! Forgive my bad English. I trying to set up shared folders, but I can't. I shared INBOX of 'victor at domain.com' for 'victor at testmail.domain.com' There is my debugging results: doveadm acl debug -u victor at testmail.domain.com INBOX.shared.victor at domain.com. doveadm(victor at testmail.domain.com): Error: Couldn't create namespace 'INBOX.shared.' for
2008 Jul 07
1
Non model cascading selects
In my model I have a city_id. ON the form I am using a cascading select to select the state, which then does a remote_submit to get the list of cities (and hence the city_id) for the selected state. The problem that I am having is that if I make a selection, hit SUBMIT and validation fails, the original selected state/city is now reset (ie, the values aren''t saved). Since they
2017 Jun 06
2
Subject: glm and stepAIC selects too many effects
If AIC is giving you a model that is too large, then use BIC (log(n) as the penalty for adding a term in the model). This will yield a more parsimonious model. Now, if you ask me which is the better option, I have to refer you to the huge literature on model selection. Best, Ravi [[alternative HTML version deleted]]