Hi folks,

Am generating  table vales as pdf file.I need to call my images in that pdf 
generated file..

how could i call?? 

its is my actual image directory "/assets/images/logo.png"

it is my model.rd,

class PerformancePdf < Prawn::Document
  def initialize(performance)
    super(top_margin: 70)
    @performance=performance
    p @performance
    performance_view
    performance_item
    performance_regards
  end
  
    
  def performance_view
  text "Hi,"
  text @performance.employee.name
  text @performance.employee.employee_id
  end
  
  def performance_item
    move_down 75
    table performance_item_rows do
      row(0).font_style = :bold
      columns(1..3).align = :right
      self.row_colors = ["DDDDDD", "FFFFFF"]
      self.header = true
    end
  end
  
  def performance_item_rows
  text "Performance Status"
  move_down 10
    [["Name", "Project", "Client", "Start Date","End Date", "Duration", 
"Remarks"]]+
    
[[@performance.employee.name,@performance.project.name,@performance.project.client,@performance.start_date,@performance.end_date,@performance.duration,@performance.task
    ]]
  end
  
  def performance_regards
  move_down 400
  text "Thanks&Regards"
  text "xxxx"
  end
 end



-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/XSkjz9CMO9QJ.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to