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
source 'http://rubygems.org' | |
gem 'rails', '3.0.0' | |
gem 'sqlite3-ruby', :require => 'sqlite3' | |
gem 'will_paginate', '3.0.pre2' | |
gem 'paperclip', :git => 'git://github.com/thoughtbot/paperclip.git' | |
gem 'mime-types', :require => 'mime/types' |
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 UploadsController < ApplicationController | |
filter_resource_access | |
def vote_up | |
begin | |
current_user.vote_exclusively_for(@upload = Upload.find(params[:id])) | |
render :nothing => true, :status => 200 | |
rescue ActiveRecord::RecordInvalid | |
render :nothing => true, :status => 404 | |
end |
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
<<<<<<< HEAD | |
revision: 37cf39fed88a9223b5ff04034383b6a50bbae21e | |
======= | |
revision: 792b1558dd79c5305dadade72e9eb458073de190 | |
>>>>>>> Downgraded to rake 0.8.7 because of issues with Heroku rake db:migrate and rake 0.9.0 |
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
def after_sign_in_path_for(resource) | |
Authorization.current_user.update_space | |
if resource.is_a?(User) && resource.has_trial_expired? | |
return url_for(:settings) | |
end | |
super | |
end |
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
ruby-1.9.2-p0 > User | |
=> User(id: integer, email: string, encrypted_password: string, password_salt: string, reset_password_token: string, remember_token: string, remember_created_at: datetime, sign_in_count: integer, current_sign_in_at: datetime, last_sign_in_at: datetime, current_sign_in_ip: string, last_sign_in_ip: string, username: string, first_name: string, last_name: string, created_at: datetime, updated_at: datetime, invitation_token: string, invitation_sent_at: datetime, plan_id: integer, current_state: string, confirmation_token: string, confirmed_at: datetime, confirmation_sent_at: datetime, space_used: integer, failed_attempts: integer, unlock_token: string, locked_at: datetime, trial_end_date: date, active_subscription: boolean) |
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
Installing json (1.5.3) with native extensions /.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems/installer.rb:483:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError) | |
/.rvm/rubies/ruby-1.9.2-p0/bin/ruby extconf.rb | |
checking for re.h... *** extconf.rb failed *** | |
Could not create Makefile due to some reason, probably lack of | |
necessary libraries and/or headers. Check the mkmf.log file for more | |
details. You may need configuration options. |
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
$ thin start | |
>> Using rack adapter | |
/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require': no such file to load -- rest_client (LoadError) | |
from /.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `block in require' | |
from /.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:225:in `block in load_dependency' | |
from /.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:596:in `new_constants_in' | |
from /.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:225:in `load_dependency' | |
from /.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require' | |
from /.rvm/gems/ruby-1.9.2-p0/gems/stripe-1.5.13/lib/stripe.rb:9:in `<top (required)>' | |
from /.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.7/lib/bundler/runtime.rb:64:in `require' |
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
<% @user.plan_id = params[:plan_id] %> | |
<%= devise_error_messages! %><br /> | |
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %> | |
<% if !params[:promo] %> | |
<%= f.collection_select :plan_id, @plan, :id, :display_name, :prompt => "Choose yourself up a real nice plan" %><br /> | |
<% end %> | |
<%= f.text_field :username, :placeholder => "Desired Username" %><br /> |
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
# Load the rails application | |
require File.expand_path('../application', __FILE__) | |
# Initialize the rails application | |
MyApp::Application.initialize! |