Created
April 20, 2015 20:36
-
-
Save anonymous/9b6a95e08c9c6b62d2b0 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
# filters in params to redirect to show page for a given monitors calibrations | |
get '/calibrations' do | |
redirect "/monitors/#{params[:tag]}/calibrations" | |
end | |
# show page of calibrations for specific monitor | |
get '/monitors/:tag/calibrations' do | |
m = DreamColorMonitor.find_by_tag(params[:tag]) | |
@calibrations = m.calibrations | |
erb :calibrations | |
end | |
# redirect to add new calibration | |
get '/calibrations/new' do | |
redirect "/monitors/#{params[:tag]}/calibrations/new" | |
end | |
# add new calibration | |
get 'monitors/:tag/calibrations/new' do | |
m = DreamColorMonitor.find_by_tag(params[:tag]) | |
@calibrations = m.new | |
erb :calibration_new | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment