I have in controller @search_sd_ticket_result = ServiceDeskTicket.find_where(:all ) do |sd| sd.number.downcase =~ "%"+@sd_ticket_number.downcase+"%" if !@sd_ticket_number==nil sd.service_desk_status_id=@sd_ticket_status_id sd.service_desk_priority_id=@sd_ticket_priority_id sd.primary_assignee=@sd_ticket_primary_assignee sd.created_on <=> (@sd_ticket_start_date..@sd_ticket_end_date) if !@sd_ticket_start_date==nil and !@sd_ticket_end_date==nil end NOW HOW TO GET THE COUNT OF RECORDS ONLY NOT THE COMPLETE DATA USING ABOVE Please help Sijo -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Your code is confusing and I dont know what records you want count in the meaning of "THE COUNT OF RECORDS ONLY NOT THE COMPLETE DATA USING ABOVE"> NOW HOW TO GET THE COUNT OF RECORDS ONLY NOT THE COMPLETE DATA USING > ABOVE >~R.A~ -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi @search_sd_ticket_result = ServiceDeskTicket.find_where(:all ) do |sd| sd.service_desk_status_id==@sd_ticket_status_id sd.service_desk_priority_id==@sd_ticket_priority_id end THIS IS WORKING HERE IN @search_sd_ticket_result I GET THE RECORDS MATCHING.BUT WHAT I NEED IS NOT TO FETCH RECORDS BUT ONLY GET THE COUNT OF RECORDS ..SO HOW CAN I ALTERATE THE ABOVE CODE TO GET THE COUNT OF RECORDS Sijo -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---