How to send an inline attachment in ruby on rails

Hi
Can anybody give me some sample program with exact steps how can I
send
an inline jpeg image attachment with the email in Ruby on Rails.I tried
on
net but I found

inline_attachment :content_type => “image/jpeg”,
:body => File.read("#{RAILS_ROOT}/public/images/bg.jpg"),
:filename=>“bg.jpg”,
:cid => ‘<cid.bg@…>’

but I don’t know where to use this code and other details.It would be
Gr8 if I can get some sample program with exact steps.so that I can
send an
inline
attachment.

thanks and regards
Kishore Mukati