$ rails g model User
belongs_to
has_one
# in spec/support/omniauth_macros.rb | |
module OmniauthMacros | |
def mock_auth_hash | |
# The mock_auth configuration allows you to set per-provider (or default) | |
# authentication hashes to return during integration testing. | |
OmniAuth.config.mock_auth[:twitter] = { | |
'provider' => 'twitter', | |
'uid' => '123545', | |
'user_info' => { | |
'name' => 'mockuser', |
var HelloModal = React.createClass({ | |
getInitialState: function() { | |
return { | |
visible: false | |
}; | |
}, | |
componentDidMount: function() { | |
var self = this; | |
$(window).on('modal.visible', function(ev){ | |
self.setState({visible: true}); |