search for: status_id

Displaying 20 results from an estimated 20 matches for "status_id".

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> <status> <message>I''ll giv...
2006 Jul 03
1
how to get value from the post on the List page
...andidates in that selected status. Simple enough scenario, but I just couldn''t get it. Every time I select anything in the dropdown and hit Go Button, I still get the list with three status < 9 Here is my code in List.rhtml. Show Candidates: <select id="candidates_status_id" name="candidates[status_id]"> <option value="" selected="selected" >Active in process</option> <% @statuses = Status.find(:all, :order => "id") @statuses.each do |item| %> <option value="<%= item.id %>...
2007 May 05
4
Stop words, fields, StandardAnalyzer quagmire
..._as_ferret({:fields => {:name => {:boost => 10}, :type => {:boost => 2}, :email => {:boost => 10}, :bio => {:store => :no}, :status_id => {:boost => 1}}, :store_class_name => true, :remote => true, :ferret => { :analyzer => Ferret::Analysis::StandardAnalyzer.new([]) } } ) With the StandardAnalyzer added, I do find results with "no&quo...
2006 Jun 08
1
question about finding with :include versus nested dynamic finder (bad form? efficiency?)
...del. Each user is given a certain status, either "Accepted", "Rejected", "OnHold", "Declined", etc. I need to find all users with a status of "Accepted", so I''m doing the following: in User.rb: belongs_to :status def accepted_users status_id = Status.find_by_status_name(''Accepted'').id self. find_all_by_status_id(status_id) end I realize that I can also perform the above query by using something like: def accepted_users User.find(:all, :include => ''status'', :conditions => ''use...
2006 Jan 27
1
Basic Many-to-One association
...ne 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 on page 234 of the book. Below is a list of what I did in my code. ========= 1) I changed the name of the field "status_id" in the cases table to "case_status_id" Then fixed the error this caused in case_controller.rb by simply changing the name of the status_id field reference. I did the same name change in app/view/case/list.rhtml, but then I modified that line later anyway. I''m sure I miss...
2007 Jul 02
8
Strange intermittent no search results problem
...gt; 2}, :body => {:boost => 1, :store => :no}, :question => {:boost => 1, :store => :no}, :answer => {:boost => 1, :store => :no}, :status_id => {:boost => 1}, :category_id => {:boost => 1}, :published => {:boost => 1}}, :store_class_name => true, :remote => true, :ferret => { :analyzer =&...
2006 Aug 09
1
question about enforcing constraints in the model
...value, the status of the user will not be updated, but the user object will still be saved. I realize I could simply set the value for the default option in the drop down menu to be the current status id of the user, so that if they submit the form without changing the value, it will update their status_id with the same value that it''s presently set to, but I wanted to know how to enforce this constraint in the model, since I figured that would be a good place to put such a restriction, rather than have to enforce it through the user interface. And I don''t want to use validates_pre...
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 set status of record, or it would be better to set ''code'' as foreign key instead of ''id''. That way I could write: 2) record.status_code = ''sent''; I am...
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 Jun 07
2
Are the find_ methods strictly a SQL thing?
...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 Alert.find :all, :joins=>"as a join status s on a.status_id=s.id", :order=>"label" (that''s from memory, sorry if there''s any syntax errors)... but there''s gotta be a better way? -- Posted via http://www.ruby-forum.com/.
2006 Apr 24
8
Application Design
...9;' the order I realize this is more of a workflow question, but I''m trying to figure out the best way to structure this. Here is one thought... Statuses Table ---------------------- ID Name Orders Table --------------------- ID Name Orders_Statuses -------------------- order_id status_id Then, I can do a join in the model to only return the correct rows. Is this the correct way to do this? Also, what type of logic should I be doing in the controller (i.e. Making sure that the Order is approved and submitted before Purchasing can order it)? Please see the following link for the B...
2006 Jan 31
2
find_by_sql question
...ters = ''WHERE '' + filters.join('' AND '') unless filters.empty? direction = ''DESC'' unless %w{ASC DESC}.include? direction find_by_sql %{SELECT crs.*, status.status AS status_status FROM crs LEFT OUTER JOIN status on status.id = crs.status_id #{filters.to_s unless filters.empty?} ORDER BY crs.#{order_by} } end -- Posted via http://www.ruby-forum.com/.
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", "edit","published","archived". That''s why the "blog" object has a foreign key, "status_id". Now, suppose I want to s...
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
2006 Mar 08
1
Nil Object Error
...problem with edit/update of records when using form validation. Here are my files for reference. ticket.rb ============ class Ticket < ActiveRecord::Base belongs_to :agent belongs_to :status belongs_to :priority belongs_to :category validates_presence_of :employee_id, :date, :agent_id, :status_id, :priority_id, :category_id, :summary end ticket_controller.rb ============ class TicketController < ApplicationController layout "standard-layout" scaffold :Ticket def edit @ticket = Ticket.find(params[:id]) @employees = Employee.find_all @agents = Agent.find_all @stat...
2005 Mar 08
1
Pluralization rules?
...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", but when I let the scripts generate the model, they pluralized it to "status". (I"m not even sure which is ''correct'' in English grammar. I would like to know if there''s a list of the rules that RoR is using,...
2002 Apr 01
0
[Bug 196] New: wront sent message id on upload
...bier at mac.com In sftp_client.c, do_upload() function, the 'id' variable is used for both the sent and the received message ids, this corrupts the id of the messages to send and randomly generates upload failures. The fix is to use another variable to extract the received message id, status_id, as done in do_download() ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
2008 May 13
4
calling another rjs file in an if condition
...submit_to_remote else @sd_ticket = ServiceDeskTicket.find(params[:sd_id]) ActiveRecord::Base.transaction do @sd_status_history = ServiceDeskStatusHistory.new @sd_status_history.service_desk_ticket_id = @sd_ticket.id @sd_status_history.service_desk_status_id = @sd_ticket.service_desk_status_id @sd_status_history.save @sd_ticket.update_attribute("service_desk_status_id",params[:status_id]) end #end of transaction if params[:page]==''search_sd_ticket'' render :update do |page|...
2009 Jul 29
0
Problem uploading file to database mysql blob field
...p --- projectslist_files_sort: :order: asc :key: filename :user_id: 1 adminprojects_sort: :order: asc :key: name issuesindex_sort: :order: desc :key: id flash: !map:ActionController::Flash::FlashHash {} :query: :project_id: 1 :filters: tracker_id: :values: - "1" :operator: "=" status_id: :values: - "" :operator: o Response Headers: {"cookie"=>[], "Cache-Control"=>"no-cache"} Thanks & Regards Saurabh -- Posted via http://www.ruby-forum.com/.
2006 Jun 18
10
acts_as_enumerated
Hello All, Any one using acts_as_enumerated? I need help using (I like that it caches values in memory) I am working on a dating website and there are lots of options I want to store as enumerated like Status; divorce, single, Sex: male, female Eye color; blue, brown, green.... and lots more.... But I do not wanna keep them in seperate tables, and wanna keep them all together. Anyone has a