similar to: question about finding with :include versus nested dynamic finder (bad form? efficiency?)

Displaying 20 results from an estimated 600 matches similar to: "question about finding with :include versus nested dynamic finder (bad form? efficiency?)"

2006 Jul 03
1
how to get value from the post on the List page
Hi, I''m new to Rails. I''m building a candidates tracking system for recruiting. I have a List page, but instead of listing every candidate, I only wanted to list the candidates in certain statuses. The first time List page is hit, by default, it lists candidates in status < 9. But on the List page, there is a dropdown where all the statuses are listed, so that when user
2007 May 05
4
Stop words, fields, StandardAnalyzer quagmire
Hello, I''m using: Ruby 1.8.6, Rails 1.2.3, ferret 0.11.4, acts_as_ferret from svn stable. I''ve had quite a day wrestling with trying to remove the use of stopwords. The problem was that when searching for words like "no" or "the", no results were found. I found a confusing thing behavior that has taken me some time to figure out, and I hope sharing it
2008 Nov 26
3
New status_id in Facebook API - FIX
Hi, I''ve had one of my application broken this morning (French time) with this error : NoMethodError (undefined method `status_id='' for #<Facebooker::User::Status:0x2ad52d1c8478 @message={}, @time="0">): It appear that Facebook API had change in the status : a status_id node is new : <user> <uid>785637999</uid>
2006 Apr 24
8
Application Design
I have a question about how to implement a design in Rails. I will try to make this as easy to follow as possible. First, let''s say that I have an ''Orders'' table that has different statuses. The 3 statuses that I want to track are ''Submitted'', ''Approved'', and ''Purchased''. I also have 3 users of this application.
2006 Jan 27
1
Basic Many-to-One association
Sari, I got the list display working without doing an explicit find. It took a bit of a conceptual convulution to get it to work. I was thinking of it has Many Cases have One status. There is no support for Many-to-One so I was a bit stumped. Then I realized you just have to turn around your thinking to say One Status has Many Cases. Thus it is a One-to-Many relationship. That is descriped
2006 Aug 09
1
question about enforcing constraints in the model
I have a user model and a status model. Each user has a specific status (accepted, rejected, declined, etc). I have a form that allows the adminstrator to change certain options for a user, including their status. I''m using a drop down menu populated with the different status values, and a default option that says "Choose a new status" with a value of "". I want to
2007 Jul 02
8
Strange intermittent no search results problem
Hello, First the specs: ruby 1.8.6, rails 1.2.3, ferret 0.11.4, mongrel 1.0.1, mongrel_cluster 0.2.1 And the model''s aaf config: # Ferret search engine acts_as_ferret({:fields => {:name => {:boost => 10}, :summary => {:boost => 2}, :body => {:boost => 1, :store => :no},
2006 Jun 07
2
Are the find_ methods strictly a SQL thing?
I''ve had a number of occasions now where I want to find something in my model that is not on the primary object. For instance I''ve got a class Alert that has_one Status. Status has a "label". I want to find all of my Alert objects and order the results alphabetically by status label. Can I do that without going into SQL? Right now I find myself doing an
2006 Mar 23
8
DRY principle - how to implement?
Hi all! I have ''send_status'' table which looks something like these: id code title 1 sent Sent 2 error Sending error 3 success Success Next I would like to associate some processed records with their ''send_status''. Is it better to use: 1) record.status_id = SendStatus.find(:one, :condition => "code=''sent''").id to
2006 Jan 31
2
find_by_sql question
I''m no good at SQL and I have a question that will hopefully be fairly easy to answer. I''m using acts_as_paranoid which instead of deleting a record adds a deleted_at column with the datetime the row was deleted. I want to have a find_by_sql filter out any row where deleted_at is not null. I have (at least the relevant parts): #a couple working filters here. filters <<
2010 Apr 07
3
Recommendation for searching with regards to timestamp & foreign key attributes
hi guys, I need a recommendation for searching with regards to timestamp & foreign key attributes. Sounds a bit too much but here''s an example. Suppose we have a "blog" object. It has many attributes such as - title - content - status_id - created_at - updated_at There are also "status" objects which have the following statuses, "new",
2006 May 29
9
design recommendations for authenticating users with lots of different attributes..?
I''ve been struggling a bit trying to figure out the best way to design/implement a system with authentication/authorization, and was hoping some of you may be able to offer some advice.. At the moment, I have a system with 4 different types of users - clients, administrators, sales_reps, and public_users. I''m using "Authorizing Users with Roles" from the Rails Recipes
2006 Mar 08
1
Nil Object Error
I''m a complete newbie when it comes to Ruby on Rails. I have lots of experience in PHP, but yesterday was the first time I sat down and began developing using Ruby on Rails (I''m impressed!). Anyway, I''m having a problem with edit/update of records when using form validation. Here are my files for reference. ticket.rb ============ class Ticket <
2005 Mar 08
1
Pluralization rules?
Is there documentation somewhere on how RoR handles pluralization? I''m finding it head-scratching/table-thumping. I''m playing with converting an old PHP app to RoR. I used to have a table called "status_code" which was referenced by column "status". I converted the "status" column to "status_id" and the table to "statuses",
2007 Sep 03
13
Some basic questions
1. I have a text area in which I type on multiple lines..but when I display it, it prints whole text in one line..how can I solve that? Datatype is TEXT 2. I can see a list of all posts at ..post/ with index method but I want to see a particular post with ..post/[id] .. how can I do that? 3. I want my application to be completely secured and whatever page unlogged in user tries to open, it
2005 Aug 19
13
Enumerations (again): Comments please
Some of my earlier questions may have hinted ever so slightly in the direction that I''m trying to implement "enumerations". By an enumeration here I mean a class that has a fixed number of immutable instances, which in turn have essentially only a name and a position. Requirements I''ve tried to meet are - Enumeration instances should only be loaded once from the
2002 Apr 01
0
[Bug 196] New: wront sent message id on upload
http://bugzilla.mindrot.org/show_bug.cgi?id=196 Summary: wront sent message id on upload Product: Portable OpenSSH Version: -current Platform: All OS/Version: other Status: NEW Severity: major Priority: P2 Component: sftp AssignedTo: openssh-unix-dev at mindrot.org ReportedBy: chombier at
2008 May 13
4
calling another rjs file in an if condition
Hi I have a controller action like below.This def is called by a submit_to_remote def edit_service_desk_status_after_transfer if params[:transfer_reason].empty? #This is used in the :failure of submit_to_remote else @sd_ticket = ServiceDeskTicket.find(params[:sd_id]) ActiveRecord::Base.transaction do @sd_status_history = ServiceDeskStatusHistory.new
2003 Oct 20
3
Music Onhold Configuration
Anyone can share me with Music Onhold Configuration sample? Thanks in advance for your help, Kang
2004 Apr 15
0
onhold bug?
I'm running the latest version of cvs (not stable), I'm not sure what the other end is running and if this has been fixed or not yet, however I was playing round with onhold earlier, the call went to onhold, and came back from it, then 2 seconds later was hung up unexpectedly, below is what was on console... -- Started music on hold, class 'default', on