similar to: multiple habtm joins on the same two tables

Displaying 20 results from an estimated 1000 matches similar to: "multiple habtm joins on the same two tables"

2006 Jan 17
15
legacy database and finder_sql nightmare!
This is my first rails app with a legacy database and I''m having a terrible time getting the models set up correctly. I have an order table that has a primary field named order_number. I have a name table with a primary of item_number. These two tables are liked by the item_number and the order_number, but not as you might think. If the order_number is 2500, then each entry in
2006 Aug 04
14
Printing an Order
Can Rails be used for printing an order in a store application that has arrived? -- Posted via http://www.ruby-forum.com/.
2006 May 17
8
How to implement full-text search with OR just like google?
The current full-text search will return the AND collection results,for example,if we use Article.search("aa bb"),then the articles that include "aa" and "bb" in the fields will be returned,how to return the articles that include "aa" OR "bb" effectly? A stumb method is to setup two queries respectly and collect them together with remove the
2006 Jan 16
3
37s style modularization ?
Hello all, I remember and have lost a link to the blog on hints about 37s modularization of basecamp, backpack, etc. Anyone remeber this and can remind me of the link? Thanks ! -- ------------------------------ Forget the icing. Bake the cake! - the epicentered developer ------------------------------ Peter Fitzgibbons -------------- next part -------------- An HTML attachment was
2006 Feb 01
6
Little Ferret Problem
I''ve implemented Ferret, using the instructions here: http://wiki.rubyonrails.com/rails/pages/HowToIntegrateFerretWithRails I get no errors in the application at all... however, I always get 0 results. I built an index off of some data, it exists in the index/ directory, the form submits find... etc... Just 0 results... all the time :) I confirmed the data from my models is being put
2006 May 23
13
acts_as_ferret 0.2.1 segfault
Hi, I just installed via script/plugin from the stable svn tag. (Revision 54) I''m running Rails 1.1.2 and have Ferret 0.9.3 (with C extensions. no compilation problems) I put together a simple model to test it and I''m getting a segfault. The model: class Report < ActiveRecord::Base acts_as_ferret :fields => [:title, :name] end $ script/console Loading development
2006 Jan 16
2
ruby embedded code replacement for onclick in link?
Is there a ruby embedded code replacement for something like this? <a href="#" onclick="window.open(''http://192.168.78.12:3000/portfolio/show/<%= item.id %>'', ''test'', ''width=660, height=500,resizable=no'')"> <%= image_tag item.image_url, :size => ''200x150'' %></a> Thanks, Dan
2006 Jan 11
2
Table prefix
Hi everybody, is it possible to override standard RoR table nomination/pluralization to include a suffix? I have some tables with usr_ prefix but i would use "real" table name in model naming. For example i have table usr_accesslogs; in normal use i should create a model called UsrAccesslog instead Accesslog. Is it possible to do this?? Thanx Davide
2007 Apr 27
4
how to evaluate a dynamic variable?
Please help me evaluate a "dynamic variable" as show in the code snippet below. # regular variable a = c(1,2,3,4) # dynamic variable set at runtime DV = "a" eval(DV) --> a eval(eval(DV)) --> a # what I want something_goes_here(DV) --> 1,2,3,4 Can someone teach me how to do this? Thanks very much. - Bobby
2006 Feb 27
3
form questions
I have a very simple form that looks allows an input for an error code and then give the show page from the scaffolding if the error code is in the database and a notification on the list page, again from the scaffolding if not. Here''s the form: find.rhtml <h1>Find error</h1> <%= start_form_tag :action => ''search''%> <p><label
2006 Aug 04
4
cannot convert String into Integer
Hi, I''m trying to implement a live search that supports searching for multiple words. So for example, if I type "ruby rails" in the search field, I would return results that have either the word "ruby" in them or the word "rails" in them. However, this is just a background as to what the following code is trying to do and might not even be needed to fix
2006 Feb 19
5
can you give a answer?
when i tail -f my log: i find this: "Completed in 0.00233 (428 reqs/sec) | Rendering: 0.00005 (2%) | DB: 0.00118 (50%)" i am sure, this request didn''t access DB. but why here DB is (50%) it''s log wrong or my fault? regards -- Posted via http://www.ruby-forum.com/.
2006 Jul 27
7
Newbie question---
I wrote a ruby script that parses a file into key-values like so: class Parser table = { } IO.foreach(''Localizable.strings'') { |line| if line =~ /^ \s* " (.*?) " \s* = \s* " (.*?) "/x table[ $1 ] = $2 end } end I want to store the key-values in different colums on my database so that when I enter a key, it gives me the corresponding value...how
2006 Aug 01
10
Migration DB Question
Just going through ''agile web development with rails'' 2nd ed. I accidentally created an empty migration source file with the wrong name, ruby script/generate migration add_test_date and then straight after that created the one I wanted to use ruby script/generate migration add_test_data and populated the second one - when I ran rake db:migrate a few times it did not seem
2006 May 01
3
Make a checkbox checked based on a condition?
I have a series of checkboxes in a form generated as follows: <% for user in @active_users %> <p><%= user.firstname + " " + user.surname%> <%= check_box ''assigned_tasks'', ''user_id'', {:index => user.id}, user.id, nil %></p> <% end %> I''d like to have one of them selected when user.id is equal to the
2006 Jul 28
6
need recommendations for apache configurations
I''m running a rails app on FedoraCore4 and so far have been using lighttpd and fastcgi. I''ve decided to switch to apache because lighttpd has been far too unstable, unpredictable, and slow. I don''t know if it''s lighttpd or the combination of lighttpd and fastcgi but it''s just not working for me. I need something that has been proven to work and
2006 May 12
2
Benchmark - Thanks Dave for making this gnawer this FAST!!
Hi List, I''ve took some time and made some tests on the performance of java-lucene, hyperestraier and ferret as Dave encourages the community of ferret to do so. Quite intersting numbers. Ferret indeed deserves to be called a high-performance port!! It''s MyFirstBenchmark ( http://ferret.davebalmain.com/trac/wiki/MyFirstBenchmark ) so please don''t be too cruel on
2006 Feb 28
2
FerretOnRails
I have spent a couple hours researching the FerretOnRails and acts_as_ferret plugin, and am very pleased with what I see so far. My question is how to have my application, with multiple models: Speakers Talks News etc.. With all varying :string and :text column types, to be able to use a single index by which I can produce a search on. I will go through each of the models and add a
2006 Sep 08
8
Ferret-0.10.3 released
Hey all, I''ve just released Ferret 0.10.3. It is mostly just a bugfix release. I''ve also added Ferret::Analysis::HyphenFilter which filters hyphenated words for better search results. Basically the way it works is it concatenates a hyphenated word as well as adding the two separate terms. So "set-up" becomes "setup", "set", "up" so
2006 Aug 08
8
Unable to freeze:edge
Hi, Whenever I try to rake rails:freeze:edge it fails. Here is the trace: (in D:/work/radrails/rdepot) ** Invoke rails:freeze:edge (first_time) ** Execute rails:freeze:edge d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/core_ext/k ernel/agnostics.rb:7: [BUG] rb_sys_fail(svn --version) - errno == 0 ruby 1.8.4 (2006-04-14) [i386-mswin32] abnormal program termination This