[Rails] Using wget in Rails controller

2011-10-13 Thread merbivore
Hi, I have a link and am getting the csv file when i do in the terminal. I would like to do that in rails controller. I need the authentication also. Here is the link wget --user=test --password=test https://demo.service-now.com/incident_list.do\?CSV; Please help me. I was struck with

[Rails] Re: Using wget in Rails controller

2011-10-13 Thread merbivore
Guys some body please help me in this. On Oct 13, 2:14 pm, merbivore eshward...@gmail.com wrote: Hi,    I have a link and am getting the csv file when i do in the terminal. I would like to do that in rails controller. I need the authentication also. Here is the link     wget --user=test

[Rails] ActiveRecord Object check based on Date field

2011-09-16 Thread merbivore
Hi All, I have a quick question related to activerecord exist. Can we do a activerecord object exist method with a date field. Like Weather.exists?(:weather_date = 22/09/11 ) Can we do like above. Please clarify me. -- You received this message because you are subscribed to the Google

[Rails] ActiveRecord Object Comparision

2011-09-05 Thread merbivore
Hi All, I have a active record object(FIRST) with some attributes. I have another activerecord object(SECOND) with different attributes. I want to compare those two active record objects whether they have equal values in every field or not. I tried like actual.attributes ==

[Rails] Re: ActiveRecord Object Comparision

2011-09-05 Thread merbivore
to compare these two objects for specific fields like ipaddress, device_name like that. Could you help me now plz. On Sep 5, 2:32 pm, Frederick Cheung frederick.che...@gmail.com wrote: On Sep 5, 10:03 am, merbivore eshward...@gmail.com wrote: Hi All,     I have a active record object(FIRST

[Rails] Merge Attribute after Rails find query

2011-08-19 Thread merbivore
Hi Everyone, I have small doubt in rails. I hope i will get solution from here. I am using rails find query like this def self.data_query(params,label) BaseManagedEntity.find(:all, :select = b.BaseManagedEntityInternalId, c.#{DEVICE_NAMES[label]}, c.#{DEVICE_IPS[label]},

[Rails] Re: Merge Attribute after Rails find query

2011-08-19 Thread merbivore
= something)   this will append that label inside the hash. On Fri, Aug 19, 2011 at 2:00 PM, merbivore eshward...@gmail.com wrote: Hi Everyone,   I have small doubt in rails. I hope i will get solution from here. I am using rails find query like this  def self.data_query(params

[Rails] Rails Looping with different attributes

2011-08-16 Thread merbivore
Hi Everyone, I am trying to solve this problem, but couldn't able to get the solution. I hope i will get some help here. I am using these three find methods to get different types of devices. I dont have any relationships between any models. windows_devices = BaseManagedEntity.find(:all,

[Rails] Re: Rails Looping with different attributes

2011-08-16 Thread merbivore
Hi Colin, Thanks for the quick reply. I can't sort out the database design becoz am pulling the data from SCOM sql server. Could you help me how can i solve this one please. On Aug 16, 1:55 pm, Colin Law clan...@googlemail.com wrote: On 16 August 2011 09:49, merbivore eshward...@gmail.com

[Rails] Re: Rails Looping with different attributes

2011-08-16 Thread merbivore
device.IPAddress_65AC01F1_F20E_CE0D_42CA_B24D1DE49E5F end end But it is giving me error undefined method `IPAddress' for #BaseManagedEntity:0x492d7d0 Please help me Colin. I was struck with this issue from 2 days. On Aug 16, 1:58 pm, merbivore eshward...@gmail.com wrote: Hi Colin,   Thanks for the quick

[Rails] Re: Rails Looping with different attributes

2011-08-16 Thread merbivore
Hi Colin, I didn't understand what you are saying. Could you tell me clearly what should i do. On Aug 16, 2:21 pm, Colin Law clan...@googlemail.com wrote: On 16 August 2011 10:05, merbivore eshward...@gmail.com wrote: Hi Colin, I tried like this also %= check_scom_column(device

[Rails] Re: Rails Looping with different attributes

2011-08-16 Thread merbivore
Hi Colin, Thanks a lot. I got the solution. On Aug 16, 2:25 pm, merbivore eshward...@gmail.com wrote: Hi Colin,   I didn't understand what you are saying. Could you tell me clearly what should i do. On Aug 16, 2:21 pm, Colin Law clan...@googlemail.com wrote: On 16 August 2011 10:05