On 16 August 2011 10:25, merbivore <eshward...@gmail.com> wrote:

The first thing I was saying was not to top post, which you ignored.

> 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) %> in the view.
>> > And in helper i provided like this
>>
>> >  def check_scom_column(device)
>> >    if device.IPAddress
>> >      return device.IPAddress
>> >    elsif device.IPAddress_65AC01F1_F20E_CE0D_42CA_B24D1DE49E5F
>> >      return device.IPAddress_65AC01F1_F20E_CE0D_42CA_B24D1DE49E5F
>> >    end
>> >  end
>>
>> > But it is giving me error undefined method `IPAddress' for
>> > #<BaseManagedEntity:0x492d7d0>
>>
>> As I said, you could catch the error.  Though probably respond_to?
>> would be better.

What did you find when you googled for
ruby catch error
and
ruby respond_to

I see that 7stud has saved you that effort.

Perhaps working through some ruby and rails tutorials would be a good idea.

Colin

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to