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 <[email protected]> wrote:
> On 16 August 2011 10:05, merbivore <[email protected]> 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.
>
> 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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to