Last active
December 11, 2015 08:28
-
-
Save yasuhito/8e3763768129f977824a to your computer and use it in GitHub Desktop.
This file contains hidden or 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 'slices/:slice_id' do | |
rest_api { Slice.find_by!(name: params[:slice_id]) } | |
end | |
class Slice | |
def self.find_by!(query) | |
# ... | |
remote_klass = | |
Trema.trema_process('RoutingSwitch', socket_dir).controller.slice | |
remote_klass.find_by!(query) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment