NUBIC/surveyor — pull request #416 by jdzak (2013-02-28 18:23:15+00:00)
Title: Add extension point for pre-JSON-export survey modifications 

Add an extension point in `SurveyMethods` which will allow the application to modify the survey in flight as it is being exported.

The initial motivation for this is to interpret selected custom_classes in an application's existing survey definitions into input masks (#415) for consumption by `nu_surveyor`.

Sketch:

```ruby
module Surveyor::Models::SurveyMethods
def as_json
# ...
Rabl.render(filtered_for_json, 'surveyor/export.json', :view_path => template_paths, :format => "hash")
end

##
# Useful documentation here.
def filtered_for_json
# return same survey by default
self
end
protected :filter_for_json
end
```