This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am boblin on github. | |
* I am boblin (https://keybase.io/boblin) on keybase. | |
* I have a public key ASBXWqrJhVLneqqTkK1RtHsKXFSBhxt8zkOWbpEzKk1qhwo | |
To claim this, I am signing this object: |
This file contains 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
class PostsController < ActionController::Base | |
def create | |
Post.create(post_params) | |
end | |
def update | |
Post.find(params[:id]).update_attributes!(post_params) | |
end | |
private |
This file contains 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
# originaly from: http://209.85.129.132/search?q=cache:xI4xvFsZlWgJ:www.northpub.com/articles/2007/04/02/testing-openid-support+rails+mocks&cd=3 | |
module OpenIdAuthentication | |
protected | |
def authenticate_with_open_id(identity_url = params[:openid_url], fields = {}) #:doc: | |
# identity_url = normalize_url(identity_url) | |
if User.find_by_openid_identifier(identity_url) | |
yield Result[:successful], identity_url | |
else |