Merge branch 'rails_3_2_12'

This commit is contained in:
Emi Matchu 2013-03-05 21:10:01 -06:00
commit a66311140f
204 changed files with 394 additions and 4608 deletions

23
Gemfile
View file

@ -1,16 +1,16 @@
source 'http://rubygems.org'
gem 'rails', '3.0.20'
gem 'rails', '= 3.2.12'
#gem 'sqlite3-ruby', '~> 1.3.1', :require => 'sqlite3'
gem 'mysql2', '>= 0.3.11'
# https://groups.google.com/d/topic/rubyonrails-security/4_YvCpLzL58/discussion
gem 'json', '~> 1.7.7'
gem 'compass', '~> 0.10.1'
gem 'haml', '~> 3.0.18'
gem 'haml', '~> 4.0.0'
gem 'rdiscount', '~> 1.6.5'
gem 'will_paginate', '~> 3.0.pre2'
gem 'devise', '~> 1.1.5'
gem 'devise', '~> 2.2.3'
# unstable version of RocketAMF interprets info registry as a hash instead of an array
gem 'RocketAMF', :git => 'git://github.com/rubyamf/rocketamf.git'
@ -20,7 +20,7 @@ gem 'openneo-auth-signatory', '~> 0.1.0'
gem 'jammit', '~> 0.6.5'
gem 'hoptoad_notifier'
gem 'airbrake', '~> 3.1.8'
gem 'addressable', :require => ['addressable/template', 'addressable/uri']
@ -64,8 +64,17 @@ gem "rest-client", "~> 1.6.7"
gem "rails-i18n"
# Needed for the new asset pipeline
group :assets do
end
gem 'sass-rails', "~> 3.2.6"
gem 'compass-rails', "~> 1.0.3"
gem 'uglifier', ">= 1.0.3"
group :development do
gem "bullet", "~> 4.1.5"
#gem "bullet", "~> 4.1.5"
end
group :development_async do
@ -86,7 +95,6 @@ group :development_async do
end
group :production do
gem 'mysql2', '< 0.3'
gem 'memcache-client', '~> 1.8.5', :require => 'memcache'
end
@ -94,4 +102,3 @@ group :test do
gem 'factory_girl_rails', '~> 1.0'
gem 'rspec-rails', '~> 2.0.0.beta.22'
end

View file

@ -1,8 +1,8 @@
GIT
remote: git://github.com/eventmachine/eventmachine.git
revision: d7c8a14dc494193a775add4b16c1e303cab5b285
revision: c520f9de3969f6f39aa5f4439f825a63dd8c0f85
specs:
eventmachine (1.0.0)
eventmachine (1.0.1)
GIT
remote: git://github.com/iain/http_accept_language.git
@ -30,9 +30,9 @@ GIT
GIT
remote: git://github.com/igrigorik/em-synchrony.git
revision: fe592a4b9b5345bca329477cb8f2f8d186b6fc7f
revision: 44c3cea84baf13a29f03ddb15c5040ec7703506f
specs:
em-synchrony (1.0.2)
em-synchrony (1.0.3)
eventmachine (>= 1.0.0.beta.1)
GIT
@ -68,7 +68,7 @@ GIT
GIT
remote: git://github.com/rubyamf/rocketamf.git
revision: ed82db7659f624d6c3ca244e4127dad270a484c7
revision: 3f16cf841d9c36045f720b307bbffa61fb63a7ac
specs:
RocketAMF (1.0.0)
@ -79,56 +79,66 @@ GEM
Platform (>= 0.4.0)
open4
Platform (0.4.0)
abstract (1.0.0)
actionmailer (3.0.20)
actionpack (= 3.0.20)
mail (~> 2.2.19)
actionpack (3.0.20)
activemodel (= 3.0.20)
activesupport (= 3.0.20)
builder (~> 2.1.2)
erubis (~> 2.6.6)
i18n (~> 0.5.0)
rack (~> 1.2.5)
rack-mount (~> 0.6.14)
rack-test (~> 0.5.7)
tzinfo (~> 0.3.23)
activemodel (3.0.20)
activesupport (= 3.0.20)
builder (~> 2.1.2)
i18n (~> 0.5.0)
activerecord (3.0.20)
activemodel (= 3.0.20)
activesupport (= 3.0.20)
arel (~> 2.0.10)
tzinfo (~> 0.3.23)
activeresource (3.0.20)
activemodel (= 3.0.20)
activesupport (= 3.0.20)
activesupport (3.0.20)
addressable (2.3.2)
arel (2.0.10)
bcrypt-ruby (2.1.4)
builder (2.1.2)
bullet (4.1.6)
uniform_notifier (~> 1.0.0)
actionmailer (3.2.12)
actionpack (= 3.2.12)
mail (~> 2.4.4)
actionpack (3.2.12)
activemodel (= 3.2.12)
activesupport (= 3.2.12)
builder (~> 3.0.0)
erubis (~> 2.7.0)
journey (~> 1.0.4)
rack (~> 1.4.5)
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.2.1)
activemodel (3.2.12)
activesupport (= 3.2.12)
builder (~> 3.0.0)
activerecord (3.2.12)
activemodel (= 3.2.12)
activesupport (= 3.2.12)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activeresource (3.2.12)
activemodel (= 3.2.12)
activesupport (= 3.2.12)
activesupport (3.2.12)
i18n (~> 0.6)
multi_json (~> 1.0)
addressable (2.3.3)
airbrake (3.1.8)
activesupport
builder
json
arel (3.0.2)
bcrypt-ruby (3.0.1)
builder (3.0.4)
carrierwave (0.5.8)
activesupport (~> 3.0)
character-encodings (0.4.1)
chronic (0.6.7)
compass (0.10.6)
haml (>= 3.0.4)
chunky_png (1.2.7)
compass (0.12.2)
chunky_png (~> 1.2)
fssm (>= 0.2.7)
sass (~> 3.1)
compass-rails (1.0.3)
compass (>= 0.12.2, < 0.14)
cookiejar (0.3.0)
devise (1.1.9)
bcrypt-ruby (~> 2.1.2)
warden (~> 1.0.2)
diff-lcs (1.1.3)
devise (2.2.3)
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.1)
railties (~> 3.1)
warden (~> 1.2.1)
diff-lcs (1.2.1)
dye (0.1.4)
em-socksify (0.2.1)
eventmachine (>= 1.0.0.beta.4)
erubis (2.6.6)
abstract (>= 1.0.0)
excon (0.16.10)
erubis (2.7.0)
excon (0.19.3)
execjs (1.4.0)
multi_json (~> 1.0)
factory_girl (2.6.4)
activesupport (>= 2.3.9)
factory_girl_rails (1.7.0)
@ -145,36 +155,37 @@ GEM
nokogiri (~> 1.5.0)
ruby-hmac
formatador (0.2.4)
haml (3.0.25)
hoptoad_notifier (2.4.11)
activesupport
builder
fssm (0.2.10)
haml (4.0.0)
tilt
hike (1.2.1)
http_parser.rb (0.5.3)
i18n (0.5.0)
i18n (0.6.4)
jammit (0.6.5)
yui-compressor (>= 0.9.3)
journey (1.0.4)
json (1.7.7)
mail (2.2.19)
activesupport (>= 2.3.6)
mail (2.4.4)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
memcache-client (1.8.5)
mime-types (1.19)
mini_magick (3.4)
mime-types (1.21)
mini_magick (3.5.0)
subexec (~> 0.2.1)
msgpack (0.5.3)
multi_json (1.3.7)
mysql2 (0.2.18)
mysql2 (0.3.11)
net-scp (1.0.4)
net-ssh (>= 1.99.1)
net-ssh (2.6.3)
newrelic_rpm (3.5.5.38)
net-ssh (2.6.6)
newrelic_rpm (3.5.8.70)
nokogiri (1.5.6)
open4 (1.3.0)
openneo-auth-signatory (0.1.0)
ruby-hmac
paper_trail (2.7.0)
orm_adapter (0.4.0)
paper_trail (2.7.1)
activerecord (~> 3.0)
railties (~> 3.0)
parallel (0.5.21)
@ -184,33 +195,38 @@ GEM
prompter (0.1.5)
dye (>= 0.1.1)
yard (>= 0.6.3)
rack (1.2.7)
rack (1.4.5)
rack-cache (1.2)
rack (>= 0.4)
rack-fiber_pool (0.9.2)
rack-mount (0.6.14)
rack (>= 1.0.0)
rack-test (0.5.7)
rack-protection (1.4.0)
rack
rack-ssl (1.3.3)
rack
rack-test (0.6.2)
rack (>= 1.0)
rails (3.0.20)
actionmailer (= 3.0.20)
actionpack (= 3.0.20)
activerecord (= 3.0.20)
activeresource (= 3.0.20)
activesupport (= 3.0.20)
rails (3.2.12)
actionmailer (= 3.2.12)
actionpack (= 3.2.12)
activerecord (= 3.2.12)
activeresource (= 3.2.12)
activesupport (= 3.2.12)
bundler (~> 1.0)
railties (= 3.0.20)
railties (= 3.2.12)
rails-i18n (0.7.2)
i18n (~> 0.5)
railties (3.0.20)
actionpack (= 3.0.20)
activesupport (= 3.0.20)
railties (3.2.12)
actionpack (= 3.2.12)
activesupport (= 3.2.12)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (~> 0.14.4)
thor (>= 0.14.6, < 2.0)
rake (10.0.3)
rdiscount (1.6.8)
rdoc (3.12)
rdoc (3.12.2)
json (~> 1.4)
redis (3.0.2)
redis (3.0.3)
redis-namespace (1.2.1)
redis (~> 3.0.0)
resque (1.23.0)
@ -221,9 +237,9 @@ GEM
resque-retry (0.1.0)
resque (>= 1.8.0)
resque-scheduler (>= 1.8.0)
resque-scheduler (2.0.0.e)
resque-scheduler (2.0.0)
redis (>= 2.0.1)
resque (>= 1.15.0)
resque (>= 1.20.0)
rufus-scheduler
rest-client (1.6.7)
mime-types (>= 1.16)
@ -247,27 +263,40 @@ GEM
tzinfo (>= 0.3.23)
sanitize (2.0.3)
nokogiri (>= 1.4.4, < 1.6)
sinatra (1.2.8)
rack (~> 1.1)
tilt (>= 1.2.2, < 2.0)
sass (3.2.6)
sass-rails (3.2.6)
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
sinatra (1.3.3)
rack (~> 1.3, >= 1.3.6)
rack-protection (~> 1.2)
tilt (~> 1.3, >= 1.3.3)
sprockets (2.2.2)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
subexec (0.2.2)
swf_converter (0.0.3)
thor (0.14.6)
tilt (1.3.3)
thor (0.17.0)
tilt (1.3.4)
treetop (1.4.12)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.35)
uniform_notifier (1.0.2)
tzinfo (0.3.36)
uglifier (1.3.0)
execjs (>= 0.3.0)
multi_json (~> 1.0, >= 1.0.2)
vegas (0.1.11)
rack (>= 1.0.0)
warden (1.0.6)
warden (1.2.1)
rack (>= 1.0)
whenever (0.7.3)
activesupport (>= 2.3.4)
chronic (~> 0.6.3)
will_paginate (3.0.4)
yard (0.8.3)
yard (0.8.5.2)
yui-compressor (0.9.6)
POpen4 (>= 0.1.4)
@ -277,11 +306,11 @@ PLATFORMS
DEPENDENCIES
RocketAMF!
addressable
bullet (~> 4.1.5)
airbrake (~> 3.1.8)
carrierwave (~> 0.5.8)
character-encodings (~> 0.4.1)
compass (~> 0.10.1)
devise (~> 1.1.5)
compass-rails (~> 1.0.3)
devise (~> 2.2.3)
em-http-request!
em-mysqlplus!
em-synchrony!
@ -290,15 +319,14 @@ DEPENDENCIES
flex!
fog (~> 1.8.0)
globalize3!
haml (~> 3.0.18)
hoptoad_notifier
haml (~> 4.0.0)
http_accept_language!
jammit (~> 0.6.5)
json (~> 1.7.7)
memcache-client (~> 1.8.5)
mini_magick (~> 3.4)
msgpack (~> 0.5.3)
mysql2 (< 0.3)
mysql2 (>= 0.3.11)
mysqlplus!
neopets (~> 0.2.0)!
newrelic_rpm
@ -307,7 +335,7 @@ DEPENDENCIES
parallel (~> 0.5.17)
patron (~> 0.4.18)
rack-fiber_pool
rails (= 3.0.20)
rails (= 3.2.12)
rails-i18n
rdiscount (~> 1.6.5)
resque (~> 1.23.0)
@ -317,6 +345,8 @@ DEPENDENCIES
right_aws (~> 2.1.0)
rspec-rails (~> 2.0.0.beta.22)
sanitize (~> 2.0.3)
sass-rails (~> 3.2.6)
swf_converter (~> 0.0.3)
uglifier (>= 1.0.3)
whenever (~> 0.7.3)
will_paginate (~> 3.0.pre2)

View file

Before

Width:  |  Height:  |  Size: 135 B

After

Width:  |  Height:  |  Size: 135 B

View file

Before

Width:  |  Height:  |  Size: 4 KiB

After

Width:  |  Height:  |  Size: 4 KiB

View file

Before

Width:  |  Height:  |  Size: 142 KiB

After

Width:  |  Height:  |  Size: 142 KiB

View file

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

View file

Before

Width:  |  Height:  |  Size: 206 B

After

Width:  |  Height:  |  Size: 206 B

View file

Before

Width:  |  Height:  |  Size: 516 B

After

Width:  |  Height:  |  Size: 516 B

View file

Before

Width:  |  Height:  |  Size: 127 KiB

After

Width:  |  Height:  |  Size: 127 KiB

View file

Before

Width:  |  Height:  |  Size: 7 KiB

After

Width:  |  Height:  |  Size: 7 KiB

View file

Before

Width:  |  Height:  |  Size: 655 B

After

Width:  |  Height:  |  Size: 655 B

View file

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View file

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View file

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View file

Before

Width:  |  Height:  |  Size: 732 B

After

Width:  |  Height:  |  Size: 732 B

View file

Before

Width:  |  Height:  |  Size: 754 B

After

Width:  |  Height:  |  Size: 754 B

View file

Before

Width:  |  Height:  |  Size: 756 B

After

Width:  |  Height:  |  Size: 756 B

View file

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View file

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View file

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

View file

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View file

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 76 KiB

View file

Before

Width:  |  Height:  |  Size: 537 B

After

Width:  |  Height:  |  Size: 537 B

View file

Before

Width:  |  Height:  |  Size: 670 B

After

Width:  |  Height:  |  Size: 670 B

View file

Before

Width:  |  Height:  |  Size: 596 B

After

Width:  |  Height:  |  Size: 596 B

View file

Before

Width:  |  Height:  |  Size: 671 B

After

Width:  |  Height:  |  Size: 671 B

View file

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

View file

@ -1,4 +1,5 @@
@import compass
@import partials/clean/constants
@import partials/clean/mixins
@ -25,4 +26,3 @@
@import static/image_mode
@import static/terms
@import users/top_contributors

View file

@ -1,6 +1,6 @@
@import "partials/context_button"
@import "partials/icon"
@import "partials/secondary_nav"
@import "../partials/context_button"
@import "../partials/icon"
@import "../partials/secondary_nav"
body.closet_hangers-index
+secondary-nav
@ -18,7 +18,7 @@ body.closet_hangers-index
input[name=q]
&.loading
background:
image: url(/images/loading.gif)
image: image-url("loading.gif")
position: 2px center
repeat: no-repeat
padding-left: $icon-width + 4px

View file

@ -1,4 +1,4 @@
@import ../shared/jquery.jgrowl
@import partials/jquery.jgrowl
@import partials/wardrobe
@import "partials/context_button"
@ -451,7 +451,7 @@ body.outfits-edit
.outfit-thumbnail-wrapper
+opacity(.5)
background:
image: url(/images/outfits/small_default.png)
image: image-url("small_default.png")
position: center center
size: $outfit-inner-size $outfit-inner-size
cursor: pointer

View file

@ -1,4 +1,3 @@
@import "compass/css3/gradient"
@import "partials/campaign-progress"
body.outfits-new

View file

@ -2,7 +2,7 @@
.campaign-progress-wrapper
+border-radius(8px)
background: #aaa
+linear-gradient(color-stops(#ccc, #aaa))
background-image: linear-gradient(color-stops(#ccc, #aaa))
border: 4px solid $module-border-color
clear: both
@ -21,7 +21,7 @@
.campaign-progress
background: $module-border-color
+linear-gradient(color-stops($module-border-color + #222, $module-border-color))
background-image: linear-gradient(color-stops($module-border-color + #222, $module-border-color))
border-right: 1px solid $module-border-color
.campaign-progress-wrapper, .campaign-progress
@ -42,4 +42,3 @@
&.campaign-loaded
.campaign-progress-wrapper
visibility: visible

View file

@ -1,4 +1,3 @@
@import "compass/css3/gradient"
@import "compass/css3/text-shadow"
@import "partials/campaign-progress"

View file

@ -16,7 +16,7 @@ class ClosetHanger < ActiveRecord::Base
scope :alphabetical_by_item_name, lambda {
joins(:item => :translations).
where(Item::Translation.arel_table[:locale].eq(I18n.locale)).
order(Item.arel_table[:name])
order(Item::Translation.arel_table[:name])
}
scope :newest, order(arel_table[:created_at].desc)
scope :owned_before_wanted, order(arel_table[:owned].desc)

View file

@ -6,8 +6,6 @@ class Contribution < ActiveRecord::Base
'PetState' => 10
}
attr_accessor :contributed
belongs_to :contributed, :polymorphic => true
belongs_to :user
@ -17,7 +15,9 @@ class Contribution < ActiveRecord::Base
@@per_page = 30
def point_value
POINT_VALUES[contributed_type]
POINT_VALUES[contributed_type] ||
raise("unexpected contributed type #{contributed_type.inspect} for " +
"contributed #{contributed.inspect}")
end
CONTRIBUTED_RELATIONSHIPS = {

View file

@ -9,7 +9,7 @@ class Item < ActiveRecord::Base
translates :name, :description, :rarity
has_many :closet_hangers
has_one :contribution, :as => :contributed
has_one :contribution, :as => :contributed, :inverse_of => :contributed
has_many :parent_swf_asset_relationships, :as => :parent
has_many :swf_assets, :through => :parent_swf_asset_relationships

View file

@ -23,20 +23,20 @@ class Pet < ActiveRecord::Base
I18n.with_locale(options[:locale]) do
viewer_data = fetch_viewer_data
pet_data = OpenStruct.new(viewer_data.custom_pet)
pet_data = viewer_data[:custom_pet]
self.pet_type = PetType.find_or_initialize_by_species_id_and_color_id(
pet_data.species_id.to_i,
pet_data.color_id.to_i
)
self.pet_type.body_id = pet_data.body_id
pet_data[:species_id].to_i,
pet_data[:color_id].to_i
)
self.pet_type.body_id = pet_data[:body_id]
self.pet_type.origin_pet = self
biology = pet_data.biology_by_zone
biology = pet_data[:biology_by_zone]
biology[0] = nil # remove effects if present
@pet_state = self.pet_type.add_pet_state_from_biology! biology
@pet_state.label_by_pet(self, pet_data.owner)
@pet_state.label_by_pet(self, pet_data[:owner])
@items = Item.collection_from_pet_type_and_registries(self.pet_type,
viewer_data.object_info_registry, viewer_data.object_asset_registry,
viewer_data[:object_info_registry], viewer_data[:object_asset_registry],
options[:item_scope])
end
@ -60,7 +60,7 @@ class Pet < ActiveRecord::Base
rescue RocketAMF::RemoteGateway::ConnectionError => e
raise DownloadError, e.message, e.backtrace
end
OpenStruct.new(envelope.messages[0].data.body)
HashWithIndifferentAccess.new(envelope.messages[0].data.body)
end
def wardrobe_query
@ -106,7 +106,7 @@ class Pet < ActiveRecord::Base
# Fetch registry data in parallel
registries = Parallel.map(candidates.keys, :in_threads => 8) do |locale|
viewer_data = I18n.with_locale(locale) { fetch_viewer_data }
[locale, viewer_data.object_info_registry]
[locale, viewer_data[:object_info_registry]]
end
# Look up any newly applied items on this pet, just in case

View file

@ -1,7 +1,8 @@
class PetState < ActiveRecord::Base
SwfAssetType = 'biology'
has_many :contributions, :as => :contributed # in case of duplicates being merged
has_many :contributions, :as => :contributed,
:inverse_of => :contributed # in case of duplicates being merged
has_many :outfits
has_many :parent_swf_asset_relationships, :as => :parent,
:autosave => false

View file

@ -5,7 +5,7 @@ class PetType < ActiveRecord::Base
belongs_to :species
belongs_to :color
has_one :contribution, :as => :contributed
has_one :contribution, :as => :contributed, :inverse_of => :contributed
has_many :pet_states
has_many :pets

View file

@ -143,7 +143,7 @@ class SwfAsset < ActiveRecord::Base
attr_accessor :item
has_one :contribution, :as => :contributed
has_one :contribution, :as => :contributed, :inverse_of => :contributed
has_many :parent_swf_asset_relationships
delegate :depth, :to => :zone
@ -201,6 +201,7 @@ class SwfAsset < ActiveRecord::Base
end
def body_specific?
Rails.logger.debug("my zone id is: #{zone_id}")
self.zone.type_id < 3 || (@item && @item.body_specific?)
end
@ -209,6 +210,7 @@ class SwfAsset < ActiveRecord::Base
end
def origin_biology_data=(data)
Rails.logger.debug("my biology data is: #{data.inspect}")
self.type = 'biology'
self.zone_id = data[:zone_id].to_i
self.url = data[:asset_url]
@ -216,6 +218,7 @@ class SwfAsset < ActiveRecord::Base
end
def origin_object_data=(data)
Rails.logger.debug("my object data is: #{data.inspect}")
self.type = 'object'
self.zone_id = data[:zone_id].to_i
self.url = data[:asset_url]

View file

@ -17,27 +17,33 @@ class User < ActiveRecord::Base
attr_accessible :neopets_username, :owned_closet_hangers_visibility,
:wanted_closet_hangers_visibility
def admin?
name == 'matchu' # you know that's right.
end
def contribute!(pet)
new_contributions = []
new_points = 0
pet.contributables.each do |contributable|
if contributable.new_record?
contribution = Contribution.new(:contributed => contributable,
:user => self)
contribution = Contribution.new
contribution.contributed = contributable
contribution.user = self
new_contributions << contribution
new_points += contribution.point_value
end
end
self.points += new_points
new_points = 0 # temp assignment for scoping
Pet.transaction do
pet.save!
new_contributions.each do |contribution|
Rails.logger.debug("Saving contribution of #{contribution.contributed.inspect}: #{contribution.contributed_type.inspect}, #{contribution.contributed_id.inspect}")
begin
contribution.save!
rescue ActiveRecord::RecordNotSaved => e
raise ActiveRecord::RecordNotSaved, "#{e.message}, #{contribution.inspect}, #{contribution.valid?.inspect}, #{contribution.errors.inspect}"
end
end
new_points = new_contributions.map(&:point_value).inject(0, &:+)
self.points += new_points
begin
save!
rescue ActiveRecord::RecordNotSaved => e

View file

@ -12,7 +12,7 @@
/[if IE]
= include_javascript_libraries :html5
= yield :stylesheets
= stylesheet_link_tag "compiled/screen"
= stylesheet_link_tag "application"
= yield :meta
= open_graph_tags
= csrf_meta_tag

0
bundle Normal file
View file

View file

@ -44,6 +44,10 @@ module OpenneoImpressItems
Mime::Type.register "image/gif", :gif
ActionController::Base.config.relative_url_root = ''
config.assets.enabled = true
config.assets.version = '1.0'
config.assets.paths << Rails.root.join('app', 'assets', 'fonts')
end
end

View file

@ -1,11 +0,0 @@
# This configuration file works with both the Compass command line tool and within Rails.
# Require any additional compass plugins here.
project_type = :rails
project_path = RAILS_ROOT if defined?(RAILS_ROOT)
# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "public/stylesheets/compiled"
sass_dir = "app/stylesheets"
environment = Compass::AppIntegration::Rails.env
# To enable relative paths to assets via compass helper functions. Uncomment:
# relative_assets = true

Some files were not shown because too many files have changed in this diff Show more