Please help(writing conditions using haml)

in ma project there is a model named campaigns and delivery_schedules .
in delivery_schedules i defined a method called below

def get_scheduled_time

self.delivery_date.to_s << " " << self.delivery_hour.to_s << “:” <<
self.delivery_minute.to_s << " " << self.delivery_meridiem.upcase
in ma view page i write code lik this to print those values like this

%b #{t :delivery_status}:
= t(campaign.delivery_status,:On_Date,:time_spec

but i am gettting errors lik this

Showing app/views/campaigns/_metrics.html.haml where line #19 raised:

You have a nil object when you didn’t expect it!
The error occurred while evaluating nil.delivery_schedule

also in a yml file i defined some parameters lik this

delivery_status: Delivery Status
on: on
On_Date: “On {{time_spec}}”
this is the result i am expecting

Scheduled On Mar 30, 2011 07:00 ( Scheduled On{{ value}}

can anyone pls help me or giv me idea to solve it

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs