Created
June 3, 2014 13:40
-
-
Save umdstu/427c1be7973735cdd41d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'open3' | |
module ApplicationHelper | |
def link_to_presenter(item, options = {}) | |
label = options[:label] | |
url = content_link(item,options) | |
link_to label, url | |
end | |
def content_link(item,options) | |
... | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Result < RescursiveOpenStruct | |
include ApplicationHelper | |
include EventHelper | |
def self.clean_up(reports, columns) | |
cleaned_reports = [] | |
reports.each do |report| | |
next unless report | |
map = report.field_map | |
map.view = link_to_presenter(map, :field => :presenter_id) | |
.. | |
.. | |
cleaned_reports << map | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NoMethodError (undefined method `link_to_presenter' for Result:Class): | |
app/models/result.rb:11:in `block in clean_up' | |
app/models/result.rb:7:in `each' | |
app/models/result.rb:7:in `clean_up' | |
app/controllers/reports_controller.rb:200:in `query' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment