Sha256: 56e92a256f6c53f57dd1c9e943c4b16c3ceced3af9c90bc2d32992c4e3f34f27
Contents?: true
Size: 686 Bytes
Versions: 1
Compression:
Stored size: 686 Bytes
Contents
module GoogleDataSource module Reporting module ActionControllerExtension # Add the option +:reporting+ to the +render+ method. # Takes a +Reporting+ object and renders the data-source response # including the form validation results def render_with_reporting(*args) if !args.first.nil? && args.first.is_a?(Hash) && args.first.has_key?(:reporting) reporting = args.first[:reporting] datasource = GoogleDataSource::DataSource::Base.from_params(params) datasource.set(reporting) render_for_text datasource.response else render_without_reporting(*args) end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
google_data_source-0.7.6 | lib/reporting/action_controller_extension.rb |