similar to: ActiveRecord bug since 1.0

Displaying 20 results from an estimated 30000 matches similar to: "ActiveRecord bug since 1.0"

2007 Feb 22
5
Combine ferret with database
Hello list, I wonder if someone has some tips on joining a ferret search with a database. I have a rails project using a postgresql backend and I would like to utilize the superb performance of ferret for fulltext searching. The problem is that I have to joined the result with the database as I have some user access rights to different documents to take into account. Does anyone have
2007 Mar 05
1
Using act_as_ferret with find_by_sql
Hello, I wonder if its possible to combine ferret queries with find_by_sql queries? Or should I try to rewrite my query using find and then use find_by_content when I''m done? Thanks for a great product! Regards, henrik
2007 Mar 06
3
Highlight method creates malformed characters.
Hello list, I''ve just updated to 0.11.3 and I came upon this problem. When using the highlight function in a rails application I sometimes get the error "Malformed UTF-8 character." It is just on certain documents and if I change the excerpt length the error disappears so it feels that if the highlight method cuts the text at the wrong character the function returns a
2005 Dec 13
2
NET VIEW equivalent in Samba
Hi! Is there a NET VIEW equivalent in samba? I looked at smbclient -L but then I have to know the browser master. I only want to specifiy a workgroup.. Regards, Henrik
2006 Jun 20
4
Searching ActiveRecord sets
Hey all, I''m learning AR and I''m trying to find the best way to search an ActiveRecord set in order to make a conditional statement decision, something like .has_value?(value) but for a multi-dimensional array like an AR set of like 100 rows. I know I can do something like this: results = Table.find_by_sql("...") for result in results if
2006 Apr 13
2
Big performance difference between smbclient put/get
Hi list, I'm using Samba 3.0.21 on a FC4 box. When copying files using smbclient I get huge speed differences between put and get commands. smb: \> put backup.tar putting file backup.tar as \backup.tar (543.0 kb/s) (average 543.0 kb/s) smb: \> get backup.tar getting file \backup.tar of size 31549440 as backup.tar (7681.4 kb/s) (average 7681.4 kb/s) smb: \> put backup.tar
2006 Apr 27
12
Execute controller function from RJS
Hi all, I wonder if it is somehow possible to execture or redirect to a controller function from RJS? Right now I do: def foo() render :partial => ''executeagain'' end _executeagain.rhtml <script> new Ajax.Updater(''elmntID'', ''/test/foo/'', {evalScripts:true}); </script> This will loop I know :) How can I achieve the same
2006 Dec 14
3
Problem with ActiveRecord and Associations
Hi, I''m having what I believe to be a typecast problem with ActiveRecord and Associations. In the code below, I need to flag a contact record for deletion if the contact doesn''t have any addresses or books records: sql = "select id, delete_flag from contacts where id = #{params[:id]}" contact = Contact.find_by_sql(sql) if (contact[0].addresses.count +
2006 Mar 08
3
date created attribute doesn't seem right
Greetings, I've setup a samba server (ver 3.0.14a-3) on debian sarge. When I copy files to the server, the 'date created' attribute is always the same value as the 'date modified' attribute. The 'date modified' attribute remains the same, but the 'date created' changes as noted above. I also have a snap server which has the same type of behavior. It is my
2011 Aug 25
3
ActiveRecord searching in batch (with find_by_sql)
I have an issue where I am getting a large number of records from the database and I cant afford to keep it in the memory due to performance issues. Therefore using the following would be ideal, User.find_each(:batch_size => 5000, :start => 2000) do |user| NewsLetter.weekly_deliver(user) end however, I would like to use find_by_sql since my query is user defined. Question is, is it
2006 May 05
1
Help with ActiveRecord
Model: class AdminQueue < ActiveRecord::Base set_table_name ''adminqueue'' end Interacting with it in script/console >> AdminQueue.new => #<AdminQueue:0x240a910 @attributes={"topic_id"=>nil, "resolved"=>nil, "updated_on"=>nil, "action"=>nil, "type"=>nil, "post_id"=>nil,
2006 Jan 16
2
ActiveRecord: table name with spaces?
Howdy. I''m trying to work with a legacy SQL Server database where some of the table names have spaces in them. I''ve done set_table_name "tablename with spaces", but I can''t get find(:all) to work. I get the following error (because apparently it''s not putting [ ] around the name as is required for SQL Server for names with spaces.
2006 May 16
1
How to handle special characters in filenames
Hi, I'm using samba 3.0.21 on a FC 4 box. I'm connecting to Win XP pro clients. Using smbclient I can get and put files which contain '%' in file names. Using libsmbclient smbc_open this is not possible. I get 'No such file or directory Errno::ENOENT' error. Any ideas how to solve this. I guess it has to do with escaping special characters in smb urls but I
2006 Nov 04
0
Problems with ActiveRecord, Oracle adapter, find_by_sql, multi-table join - ORA-04043 error
Hi all, Windows XP Oracle 10g client OCI8 0.1.16 Ruby 1.8.5 Rails 1.1.6 I''m hitting weird behavior with the Oracle adapter and a find_by_sql call on a multi-table join. The SQL looks like this: SELECT DISTINCT e1.ip_address, loc.street, loc.city, loc.state FROM schema.net_element ne, schema.equipment e1, schema.equipment e2, schema.building b, schema.cust_loc cl, schema.location
2013 Dec 17
1
ActiveRecord and tiny_tds
Hi, I''m having some issues trying to run .find_by_sql against a Win MSSQL 2008 server. When I use the tiny_tds gem the query works without any issues. require ''rubygems'' gem ''tiny_tds'', ''= 0.6.2'' require ''tiny_tds'' gem ''activerecord'', ''= 3.2.12'' require
2007 Apr 09
1
help with ActiveRecord joins
I''m working on a fairly complex join query and could use a bit of advice from more expert users of ActiveRecord. I have an events table with quite a lot of data, with has_many relations to categories, age_groups, and event_images. In my first naive implementation, each event had a date, so to load all upcoming events efficiently, I''d do: Event.find(:all,
2006 Jun 18
3
ActiveRecord Help - Not finding Data
Hello, I''m farily new to RoR and am having a problem trying to retrieve data from my database. Here is the code from my controller: def index zip = params["zip"] @zip1 = Zipcode.find(:first, :conditions => ["zip = ?", zip]) lat = @zip1.latitude.to_f long = @zip1.longitude.to_f radius = 50 @bookstores = Bookstore.find_by_sql ["SELECT * FROM
2006 Mar 21
0
Nested One-To-Many ActiveRecord Question
I have a set of one-to-many relationships, nested 4 deep. In other words: table_A has_many table_B, table_B belongs_to table_A, has_many table C, table_C belongs_to table_B, has_many table D, table_D belongs_to table_C Now, I want to to find on table_A, based on criteria in table_D, and I want to paginate it. And I need fields from all four tables in the result set. Does anyone know
2005 Jul 11
0
anyone using ENCODE and DECODE in SQL in ActiveRecord?
I keep some sensitive information encoded using MySQL''s ENCODE and DECODE commands in the database table. -- example SQL: SELECT *, DECODE(ccnumblob, ''salthere'') AS ccnum FROM customers WHERE id=2; UPDATE customers SET ccnumblob = ENCODE(''4321432143214321'', ''salthere'') WHERE id=2; INSERT INTO customers (name, ccnumblob) VALUES
2007 Sep 26
0
activerecord multiple databases
So, I was looking for a setup that would allow me to easily query multiple databases and not have to re-write my customer finder type queries. Here is what I came up with and it seems to be working for me in my very basic tests so I thought I''d share. Just posting it in case this helps anyone else trying to do the same thing. I''m using this with activerecord, but not rails, so