I hereby claim:
- I am yoon on github.
- I am yoon (https://keybase.io/yoon) on keybase.
- I have a public key whose fingerprint is 3964 EBA0 F14F EB93 1642 B923 02F8 4266 60F3 B9DE
To claim this, I am signing this object:
| def self.export(params) | |
| {:report => "", :name => "blank"} if params[:responses].blank? | |
| # surveys | |
| responses_surveys = Survey.includes({:sections => {:questions => :answers}}).find(params[:responses] || []) | |
| questions = responses_surveys.map(&:sections).flatten.map(&:questions).flatten.reject{|q| q.display_type == "label"} | |
| answers = questions.map(&:answers).flatten | |
| # response sets | |
| from = params[:date_from].blank? ? nil : Date.strptime(params[:date_from], '%m-%d-%Y') |
| Questions may have many answers, e.g. "Fun, Kind, Cool". Export one column per answer, or collapse to one column per question. | |
| %h4 Columns - one per: | |
| = radio_button_tag :column, :answer, true | |
| = label_tag :column_answer, "answer" | |
| = radio_button_tag :column, :question | |
| = label_tag :column_question, "question" | |
| An answer has various identifiers set in the form definition. Response count is the number of times an answer is selected. |
| require 'rubygems' | |
| require 'zip' | |
| archive_directory_path = '' | |
| archive_zip_path = '' | |
| Zip::File.open( archive_zip_path, Zip::File::CREATE ) do |zip_file| | |
| Dir[ File.join( archive_directory_path, "**", "**" ) ].each do |file| | |
| zip_file.add( file.sub( "#{ archive_directory_path }/", "" ), file ) | |
| end |
| module SurveyCustomMethods | |
| def translation(locale_symbol) | |
| {:title => self.title, :description => self.description} | |
| end | |
| end | |
| class Survey < ActiveRecord::Base | |
| include Surveyor::Models::SurveyMethods | |
| include SurveyCustomMethods | |
| end |
| module SurveySectionCustomMethods | |
| def translation(locale) | |
| {:title => self.title, :description => self.description} | |
| end | |
| end | |
| class SurveySection < ActiveRecord::Base | |
| include Surveyor::Models::SurveySectionMethods | |
| include SurveySectionCustomMethods | |
| end |
| { | |
| "$schema": "http://json-schema.org/draft-04/schema#", | |
| "definitions": { | |
| "entry": { | |
| "allOf": [ | |
| { "$ref": "#/definitions/thing_with_codes" }, | |
| { "properties": { | |
| "description": { "type": ["string", "null"] }, | |
| "specifics": { "type": ["string", "null"] }, | |
| "time": { "type": ["integer", "null"] }, |
| // ==UserScript== | |
| // @name Hide HarvestApp "Submit for Approval" button | |
| // @namespace http://tablexi.harvestapp.com/ | |
| // @version 0.1 | |
| // @description This script hides anything with the .approval-button class | |
| // @author Mark Yoon | |
| // @match https://tablexi.harvestapp.com/* | |
| // @grant GM_addStyle | |
| // ==/UserScript== |
| # https://www.invisionpower.com/support/guides/_/install-and-getting-started/installing-r18 | |
| # before installation | |
| ## blue | |
| chmod 0777 blog | |
| ## blue with * | |
| chmod -R 0777 cache css_files downloads hooks public/ipc_blocks public/style_css public/style_emoticons public/style_images screenshots | |
| uploads |
I hereby claim:
To claim this, I am signing this object:
via: http://blog.pivotal.io/labs/labs/leave-your-migrations-in-your-rails-engines
in lib/[engine_name]/engine.rb
initializer :append_migrations do |app|
unless app.root.to_s.match root.to_s
config.paths["db/migrate"].expanded.each do |expanded_path|
app.config.paths["db/migrate"] << expanded_path