Rundeck issue with tags

While playing with foreman and it's rundeck integration I was getting the
below error when using rundeckfacts parameter:

Processing HostsController#show to yaml (for 10.10.10.10 at 2012-03-21
12:10:14) [GET]
Parameters: {"controller"=>"hosts", "format"=>"yaml", "action"=>"show",
"id"=>"puppet.xcastlabs.com", "rundeck"=>"true"}
Failed to fetch rundeck info for my.domain.com: undefined local variable or
method `fact' for #<Host:0x7f5a8cd4f9c0>
Completed in 115ms (View: 1, DB: 13) | 200 OK
[https://my.domain.com/hosts/my.domain.com?rundeck=true&format=yaml]

Issue seems to be with line 587 in foreman/app/models/host.rb:
rdecktags += self.params["rundeckfacts"].split(",").map{|rdf|
"#{rdf}=#{fact(rdf)[0].value}"}
I changed it the below to make it work:
rdecktags += self.params["rundeckfacts"].split(",").map{|rdf|
"#{rdf}=#{facts_hash.fetch(rdf)}"}