Guest User

Untitled

a guest
Aug 14th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. Riak and Ruby: Ripple not return valid entries
  2. require 'ripple'
  3. require 'sinatra'
  4.  
  5. class Article
  6. include Ripple::Document
  7. property :title, String
  8. property :body, String
  9. end
  10.  
  11. get '/' do
  12. @articles = Article.all
  13. erb :articles
  14. end
  15.  
  16. post '/' do
  17. article = Article.new(:title => params[:title], :body => params[:body])
  18. article.save
  19. end
Add Comment
Please, Sign In to add comment