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
Riddle.new(riddle.attributes.merge(id: nil)) |
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
- if @riddle && @riddle.id | |
a.button href="/edit/riddle/#{@riddle.id}" Edit this Riddle |
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
iframe {width: 100%; min-height: 600px; border: none; } |
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
- if @riddle | |
link rel="stylesheet" href="/css/riddle/#{@riddle.id}/styles.css" | |
script src="/js/riddle/#{@riddle.id}/script.js" |
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
- if @riddle | |
link rel="stylesheet" href="/css/riddle/#{@riddle.id}/styles.css" | |
script src="/js/riddle/#{@riddle.id}/script.js" |
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
Riddle.new(riddle.attributes.merge(id: nil)) |
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
- if @riddle && @riddle.id | |
a.button href="/edit/riddle/#{@riddle.id}" Edit this Riddle |
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
iframe {width: 100%; min-height: 600px; border: none; } |
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
- if @riddle | |
link rel="stylesheet" href="/css/riddle/#{@riddle.id}/styles.css" | |
script src="/js/riddle/#{@riddle.id}/script.js" |
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 '/css/riddle/:id/styles.css' do | |
riddle = Riddle.get(params[:id]) | |
scss "#riddle #{riddle.css}" | |
end | |
get '/js/riddle/:id/script.js' do | |
riddle = Riddle.get(params[:id]) | |
content_type 'text/javascript' | |
render :str, riddle.js, :layout => false | |
end |