Created
April 18, 2012 15:01
-
-
Save anonymous/2414148 to your computer and use it in GitHub Desktop.
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
#controller | |
def index | |
@ordered_medications = @visit.pds_prescriptions.ordered_medications.order(:label) | |
@prn_medications = @visit.pds_prescriptions.prn.order('start_datetime DESC') | |
#raise params[:print].inspect | |
#raise get_report_model(params[:print] == 'active').inspect | |
report_model = get_report_model(params[:print] == 'active') | |
respond_with :report_model => report_model, :visit => @visit, :print => params[:print] | |
end | |
#spec | |
it "get_report_model should hide inactive meds on request" do | |
get 'index',:visit_id => @visit.id | |
p report_model = assigns[:report_model] | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment