Displaying 20 results from an estimated 300 matches similar to: "Refactoring ActiveRecord's private methods"
2006 Apr 06
7
[Fwd: Rails AR/Oracle Unit Test: [4185] failed]
So my automated script caught this issue, though I think my email
headers were bad, so rails-core has put the automated email on hold
pending "moderation".
I''ll fix that issue, and look at the one below as well.
-------- Original Message --------
Subject: Rails AR/Oracle Unit Test: [4185] failed
Date: Thu, 6 Apr 2006 08:32:04 -0700
From: Michael Schoen
2006 Mar 16
1
Rails SQL generation (Firebird adapter) - can someone explain ...
I see some possible issues with the SQL that is being generated by the
firebird adapter.
Every SQL is being generated on the fly by concatenating strings.
Can someone please explain why the SQL is being generated the way it is?
I cannot use this in real life for a couple of reasons:
1. This introduces a security hole because a user, accidentally or
deliberately, could potentially submit a
2006 Mar 28
2
add_limit (in acts_as_taggable) breaks in 1.1, solution?
Upgraded from Rails 1.0 to 1.1 and found that the (slightly modified)
acts_as_taggable plugin breaks. The line
add_limit!(sql, options)
(in the tags_count method) causes this error
wrong number of arguments (2 for 3)
The documentation still says it takes two args, so I''m not sure what''s
wrong. Adding
logger.info("SQL here: " + sql)
2006 Apr 01
3
acts_as_taggable, wrong number of arguments
Hello,
When I try:
@tagged_items = Problem.find_tagged_with :all => ''kuba''
or
@tagged_items = Problem.tags_count :limit => 100
I get this error:
ArgumentError in Volume#index
wrong number of arguments (2 for 3)
RAILS_ROOT: script/../config/..
Application Trace | Framework Trace | Full Trace
2013 Dec 17
2
Setting up a lustre zfs dual mgs/mdt over tcp - help requested
Hi all,
Here is the situation:
I have 2 nodes MDS1 , MDS2 (10.0.0.22 , 10.0.0.23) I wish to use as
failover MGS, active/active MDT with zfs.
I have a jbod shelf with 12 disks, seen by both nodes as das (the
shelf has 2 sas ports, connected to a sas hba on each node), and I
am using lustre 2.4 on centos 6.4 x64
I have created 3 zfs pools:
1. mgs:
# zpool
2004 Feb 25
1
More on etc and other stuff
I seem to have gotten the bugs worked out of win32-etc. It seems it had
to do with using WCHAR vs LPWSTR. Once I used AllocWideLString() vs
AllocWideString() everything seemed to work ok.
One question I have now is this - should I always use AllocWideLString()
instead of casting like (LPCWSTR)STR2CSTR(rbVal); ? It would seem so,
but I''m not sure.
Also, I''ve committed the
2006 Feb 19
2
progressive updates
I have a list view and have it sorting the data presented in the list
view by clicking on the top of the column - that works fine.
Now, I want to add a pop up-list which controls 3 different levels of
record select to be presented in this list...
- ALL
- placement.discharge_date IS NULL
- placement.discharge_date IS NOT NULL
I can have 3 different ''methods'' and
2007 Jul 23
2
Firebird, fireruby
Hi Guys
I am pretty new to Ruby. One of our client is using Firebird as his
backend database. I have to create a script which will connect to his
database, fetch some data and update few tables in MS-SQL database.
Now problem is: i have installed FireRuby, got databaes, changed my
database.yml file.
I am trying to display all the users in Members table. but i am
getting following error:
2006 Jan 10
1
sql server freetds/odbc question
I''m having an error from Linux via freeTDS/ODBC to SQL Server with
cod that runs fine against SQLite and MySQL. Here''s the code:
def find_recipes_for_workorder_by_id
@recipe_pages, @recipes = paginate_with_sort :recipes, :per_page
=> 10, \
:conditions => ["recipe.workorder_id = ?", params
[:workorder]]
render :template =>
2006 Jan 10
1
sql server & linux: left join problem
I''ve got a left join problem of some sort connecting from linux
FreeTDS/ODBC to SQL Server. It''s similar to the false post I had
earlier, but this is a real problem. Here''s my code:
def find_recipes_for_workorder
@recipe_pages, @recipes = paginate_with_sort :recipes, :per_page
=> 10, \
:joins => ''left join workorder on
2005 Mar 23
1
Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)
I am getting random can''t connect to MySQL server errors on my Rails application
located at http://www.thedatingguy.com/blog
Do you have any clue why this is happening?
This is the error:
Mysql::Error (Can''t connect to local MySQL server through socket
''/tmp/mysql.sock'' (61)):
2006 Jun 20
2
Problem with "can''t dump anonymous class Class"
I submitted this earlier, but the web forums went down and I''ve screwed up
the thread, so I''m starting over.
I''m trying to built a document upload system. The system has a main
Document model with different subclasses for different types of documents.
With the code below, if I attempt to create a Document, it works fine, but
if I attempt to use one of the subclasses, I
2006 Apr 04
5
How to implement tag clouds using plugin?
The code on
http://blog.craz8.com/articles/2005/10/28/acts_as_taggable-is-a-cool-piece-of-code
is based on the acts_as_taggable gem,anybody has done that using the
acts_as_taggable plugin?thanks!
btw:the code above uses the tag_count method,which is defined in the
gem:
def tags_count(options = {})
options = {:order => ''count DESC''}.merge(options)
2009 Mar 09
3
multiple columns primary key
Hi all,
I have two tables:
TABLE 1
A pk - fk (referencesc TABLE 2)
B pk
C pk
D pk
E
F
TABLE 2
A pk
G
H
I
L
I don''t use incremental field (id). I''d like don''t use find_by_sql.
How can I define both models to use correctly find method (with
include)? With only one column primary key I haven''t problems.
I thought two solutions, but I don''t like these
2006 Jun 19
3
can''t dump anonymous class Class
I''m trying to create a document upload system, where most of the code is
the super class Document and just the path to file on the system is
controlled by the sub classes. When I attempt to use my code, I get the
following when I try to save the document.
can''t dump anonymous class Class
Any ideas?
** Migration **
class CreateDocuments < ActiveRecord::Migration
def
2009 Aug 07
0
How to specify ActiveRecord's to_json encoding
Question:
Hi, our company is using Ruby 1.8.6 with Rails 2.2.2. Does anyone
know we can explicitly specify what encoding to use when calling
to_json() or to_xml() methods?
Problem:
We have some multibyte characters in our database. For example we
have a table with a name column that has this French accented e: Café
Records. When we serialize this object using ActiveRecord''s to_xml()
2006 Sep 07
1
ActiveRecord's "conditions" magic
I''ve programmatically built an array suitable for ActiveRecord::Base.find()s
:conditions parameter. However, I''m also doing a find_by_sql on the same model
and I want to generate the relevant WHERE clause.
Does Activerecord have an easy way to do this? I can''t see anything immediately
in the docs
Thanks,
Gareth
--~--~---------~--~----~------------~-------~--~----~
2005 Nov 16
4
What happened to mysql connection?
I''ve been using Rails for more than six months and until today I had
no problem with mysql connection.
It''s a Mac OS X 10.4 box having rails installed and updated by gem. I
use a remote mysql server no local instance installed.
Here''s my config:
development:
adapter: mysql
database: hdchat
host: 10.0.0.1
username: webuser
password:
test:
adapter:
2007 Dec 09
0
straight join in rails
Maybe someone will find this useful:
I have a relatively complex (My)SQL query that results from having many
many :conditions and :includes, and MySQL seems to apply a wrong join
order so I wanted to force an order using the STRAIGHT_JOIN statement,
but rails doesn''t really let you do it. Having to construct this query
manually (there are 4 joins) and still have a right format for eager
2006 Apr 26
2
Multiple Select example?
I''ve been trying to sort out a multiple select dropdown but haven''t
found any good examples - anyone know of any or perhaps could make a
suggestion [see below]
Model:
1. Task AR has_many users
2. User AR belongs_to task
login/password attributes
Controller:
View:
<%= collection_select("task", "users" , @users, "id", "login", {},