Skip to content

Instantly share code, notes, and snippets.

/ruby.rb Secret

Created December 10, 2015 21:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/9d8b54ee76bdfaebb11b to your computer and use it in GitHub Desktop.
Save anonymous/9d8b54ee76bdfaebb11b to your computer and use it in GitHub Desktop.
# app.rb
class IDontLikeMRIException < Exception; end
Dir[base_path + 'components/*.routes.rb'].each do |file|
begin
require file
rescue IDontLikeMRIException
end
end
# components/pdf.routes.rb
raise IDontLikeMRIException if RUBY_PLATFORM == 'jruby'
# ... routes code
# components/session.routes.rb
# ... routes code
# components/account.routes.rb
# ... routes code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment