Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: jackquack/BitPredictor
base: 0da0640865
...
head fork: jackquack/BitPredictor
compare: fb570e199e
Checking mergeability… Don't worry, you can still create the pull request.
  • 4 commits
  • 11 files changed
  • 0 commit comments
  • 1 contributor
View
3  app/assets/javascripts/users.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
View
3  app/assets/stylesheets/users.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the Users controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
View
3  app/controllers/users_controller.rb
@@ -0,0 +1,3 @@
+class UsersController < InheritedResources::Base
+ respond_to :json
+end
View
2  app/helpers/users_helper.rb
@@ -0,0 +1,2 @@
+module UsersHelper
+end
View
2  app/models/prediction.rb
@@ -1,5 +1,5 @@
class Prediction < ActiveRecord::Base
- attr_accessible :end_date, :name, :prediction, :source, :verified_by
+ attr_accessible :end_date, :name, :prediction, :source, :verified_by, :user_id
has_many :sells
has_many :buys
has_many :transactions
View
1  app/views/predictions/_form.html.haml
@@ -15,6 +15,7 @@
.field
= f.label :prediction
= f.text_area :prediction
+ = f.hidden_field :user_id, :value => current_user.id
.field
= f.label :source
= f.text_field :source
View
6 config/initializers/configatron.rb
@@ -0,0 +1,6 @@
+require 'configatron'
+
+configatron.production.facebook.app_id = 152613691570503
+configatron.production.facebook.app_secret = '623644277ea911b9dbc695f2c9937932'
+configatron.development.facebook.app_id = 527188943990546
+configatron.development.facebook.app_secret = 'a90cb7138481f1540fad9e3d8ba5b0c1'
View
11 config/initializers/devise.rb
@@ -1,10 +1,15 @@
require "omniauth-facebook"
-OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE if Rails.env.development?
+OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE if Rails.env.development?
# Use this hook to configure devise mailer, warden hooks and so forth.
# Many of these configuration options can be set straight in your model.
Devise.setup do |config|
- config.omniauth :facebook, "527188943990546", "a90cb7138481f1540fad9e3d8ba5b0c1",
- {:scope => 'email, offline_access', :client_options => {:ssl => {:ca_file => '/usr/lib/ssl/certs/ca-certificates.crt'}}}
+ if Rails.env.production?
+ config.omniauth :facebook, configatron.production.facebook.app_id, configatron.production.facebook.app_secret,
+ {:scope => 'email, offline_access', :client_options => {:ssl => {:ca_file => '/usr/lib/ssl/certs/ca-certificates.crt'}}}
+ else
+ config.omniauth :facebook, configatron.development.facebook.app_id, configatron.development.facebook.app_secret,
+ {:scope => 'email, offline_access', :client_options => {:ssl => {:ca_file => '/usr/lib/ssl/certs/ca-certificates.crt'}}}
+ end
# ==> Mailer Configuration
# Configure the e-mail address which will be shown in Devise::Mailer,
View
2  config/routes.rb
@@ -19,6 +19,8 @@
devise_for :users, :controllers => { :omniauth_callbacks => "omniauth_callbacks"}
+ resources :users
+
root :to => "predictions#index"
# The priority is based upon order of creation:
# first created -> highest priority.
View
7 test/functional/users_controller_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class UsersControllerTest < ActionController::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
View
4 test/unit/helpers/users_helper_test.rb
@@ -0,0 +1,4 @@
+require 'test_helper'
+
+class UsersHelperTest < ActionView::TestCase
+end

No commit comments for this range

Something went wrong with that request. Please try again.