Skip to content

Instantly share code, notes, and snippets.

@tmking
Created July 7, 2009 03:21
Show Gist options
  • Save tmking/141859 to your computer and use it in GitHub Desktop.
Save tmking/141859 to your computer and use it in GitHub Desktop.
class PianofinderController < ApplicationController
def index
@questions = Question.find_questions
# render :text => @questions['answer']
# @answers = Question.find_answers
end
def results
show_artcase && render(:text => 'yes it is artcase')
end
def show_artcase
return true if params['q6'] == '0'
end
def show_upright
return true if params['q6'] == '1'
end
def show_grand
return true if params['q6'] == '2'
end
def show_small_grand
return true if params['q8'] != '0'
end
def show_digital
return true if params['q8'] == '0'
end
def show_player
return true if params['q5'] != '0'
end
def get_finish
case params['q9']
when '0': 'ebony'
when '1': 'mahogany'
when '2': 'cherry'
when '3': 'walnut'
when '4': 'oak'
when '5': 'white'
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment