Advertisement
Guest User

Untitled

a guest
Jan 7th, 2014
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.37 KB | None | 0 0
  1. #config.ru
  2. require "./app.rb"
  3. require "opal"
  4. require "opal-sprockets"
  5.  
  6. map '/assets' do
  7.   env = Opal::Environment.new
  8.   env.append_path 'opal'
  9.   env.append_path 'views'
  10.   run env
  11. end
  12.  
  13. run Sinatra::Application
  14.  
  15.  
  16. #opal/test.rb
  17. require "opal"
  18. require "template"
  19. require 'login'
  20.  
  21. puts Template['login'].render self
  22.  
  23. #file structure:
  24. -views/
  25.        login.opalerb
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement