This file contains 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
get_values(form_elements_cache, question_element).inject(radio_buttons = "") do |radio_buttons, value_hash| | |
html_options[:id] = "#{id}_#{i += 1}" | |
html_options[:onclick] = select_answer_event if follow_ups | |
codes << {:id => html_options[:id], :code => value_hash[:code]} | |
unless question_element.export_column.blank? | |
cdc_attributes << {:id => html_options[:id], :export_conversion_value_id => value_hash[:export_conversion_value_id]} | |
end | |
selected_code = @object.radio_button_answer.include?(value_hash[:value]) ? value_hash[:code] : "" unless !selected_code.blank? |
This file contains 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 PostsController < ApplicationController | |
# Automatically create the strong parameters required method | |
def PostsController.filter_parameters(options = {}) | |
options[:for] = [options[:for]] if options[:for].is_a?(Symbol) | |
options[:for].each do |action_name| | |
define_method("#{action_name.to_s}_params") do | |
base = options[:require].keys.first | |
params.require(base).permit(*options[:require][base]) | |
end |
OlderNewer