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
#Create a new Blog | |
#rails g Blog | |
#rails g scaffold Post title body:text | |
#Using Basic auth | |
class ApplicationController < ActionController::Base | |
http_basic_authenticate_with name: "test", password: "test" | |
end | |
#rails s | |
#from console | |
#2.1-head :039 > require 'active_resource' | |
#true | |
class Post < ActiveResource::Base | |
self.site = "http://test:test@localhost:3000" | |
end | |
#2.1-head :036 >post = Post.new | |
#2.1-head :036 >post.title = "works?" | |
#2.1-head :036 >post.save | |
#=> true |
No comments:
Post a Comment