revert a piece of the theme assets refactoring + upgrade Gemfile as well as the gemspec
This commit is contained in:
parent
c178346969
commit
6ac4ff0393
2
Gemfile
2
Gemfile
@ -7,7 +7,7 @@ gem 'rails', '>= 3.0.3'
|
|||||||
gem 'warden'
|
gem 'warden'
|
||||||
gem 'devise', '= 1.1.3'
|
gem 'devise', '= 1.1.3'
|
||||||
|
|
||||||
gem 'mongoid', '~> 2.0.0.rc.6'
|
gem 'mongoid', '~> 2.0.0.rc.7'
|
||||||
gem 'bson_ext', '1.2.0'
|
gem 'bson_ext', '1.2.0'
|
||||||
gem 'locomotive_mongoid_acts_as_tree', '0.1.5.2', :require => 'mongoid_acts_as_tree'
|
gem 'locomotive_mongoid_acts_as_tree', '0.1.5.2', :require => 'mongoid_acts_as_tree'
|
||||||
gem 'will_paginate'
|
gem 'will_paginate'
|
||||||
|
@ -281,7 +281,7 @@ DEPENDENCIES
|
|||||||
locomotive_mongoid_acts_as_tree (= 0.1.5.2)
|
locomotive_mongoid_acts_as_tree (= 0.1.5.2)
|
||||||
mimetype-fu
|
mimetype-fu
|
||||||
mocha!
|
mocha!
|
||||||
mongoid (~> 2.0.0.rc.6)
|
mongoid (~> 2.0.0.rc.7)
|
||||||
pickle
|
pickle
|
||||||
rails (>= 3.0.3)
|
rails (>= 3.0.3)
|
||||||
rmagick (= 2.12.2)
|
rmagick (= 2.12.2)
|
||||||
|
@ -24,6 +24,11 @@ module Admin
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def edit
|
||||||
|
resource.performing_plain_text = true if resource.stylesheet_or_javascript?
|
||||||
|
edit!
|
||||||
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
create! do |success, failure|
|
create! do |success, failure|
|
||||||
success.json do
|
success.json do
|
||||||
|
@ -20,7 +20,6 @@ class ThemeAsset
|
|||||||
index [[:site_id, Mongo::ASCENDING], [:local_path, Mongo::ASCENDING]]
|
index [[:site_id, Mongo::ASCENDING], [:local_path, Mongo::ASCENDING]]
|
||||||
|
|
||||||
## callbacks ##
|
## callbacks ##
|
||||||
after_initialize :set_performing_plain_text_boolean
|
|
||||||
before_validation :store_plain_text
|
before_validation :store_plain_text
|
||||||
before_validation :sanitize_folder
|
before_validation :sanitize_folder
|
||||||
before_validation :build_local_path
|
before_validation :build_local_path
|
||||||
@ -106,11 +105,6 @@ class ThemeAsset
|
|||||||
|
|
||||||
protected
|
protected
|
||||||
|
|
||||||
def set_performing_plain_text_boolean
|
|
||||||
self.performing_plain_text = true if self.stylesheet_or_javascript?
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
def safe_source_filename
|
def safe_source_filename
|
||||||
self.source_filename || self.source.send(:original_filename) rescue nil
|
self.source_filename || self.source.send(:original_filename) rescue nil
|
||||||
end
|
end
|
||||||
|
@ -17,21 +17,20 @@ Gem::Specification.new do |s|
|
|||||||
s.required_rubygems_version = ">= 1.3.6"
|
s.required_rubygems_version = ">= 1.3.6"
|
||||||
s.rubyforge_project = "nowarning"
|
s.rubyforge_project = "nowarning"
|
||||||
|
|
||||||
s.add_dependency "rails", ">= 3.0.0"
|
s.add_dependency "rails", ">= 3.0.3"
|
||||||
s.add_dependency "warden"
|
s.add_dependency "warden"
|
||||||
s.add_dependency "devise", "= 1.1.3"
|
s.add_dependency "devise", "1.1.3"
|
||||||
s.add_dependency "mongoid", "~> 2.0.0.rc.6"
|
s.add_dependency "mongoid", "~> 2.0.0.rc.7"
|
||||||
s.add_dependency "bson_ext", "= 1.2.0"
|
s.add_dependency "bson_ext", "~> 1.2.0"
|
||||||
s.add_dependency "locomotive_mongoid_acts_as_tree", "0.1.5.2"
|
s.add_dependency "locomotive_mongoid_acts_as_tree", "0.1.5.2"
|
||||||
s.add_dependency "will_paginate"
|
s.add_dependency "will_paginate"
|
||||||
|
|
||||||
s.add_dependency "haml", "= 3.0.18"
|
s.add_dependency "haml", "3.0.25"
|
||||||
s.add_dependency "locomotive_liquid", "2.2.2"
|
s.add_dependency "locomotive_liquid", "2.2.2"
|
||||||
s.add_dependency "formtastic", ">= 1.1.0"
|
s.add_dependency "formtastic", "~> 1.2.3"
|
||||||
s.add_dependency "inherited_resources", "1.1.2"
|
s.add_dependency "inherited_resources", "~> 1.1.2"
|
||||||
|
|
||||||
|
s.add_dependency "rmagick", "2.12.2"
|
||||||
s.add_dependency "rmagick", "= 2.12.2"
|
|
||||||
s.add_dependency "locomotive_carrierwave", "0.5.0.1.beta2"
|
s.add_dependency "locomotive_carrierwave", "0.5.0.1.beta2"
|
||||||
|
|
||||||
s.add_dependency "custom_fields", "1.0.0.beta.4"
|
s.add_dependency "custom_fields", "1.0.0.beta.4"
|
||||||
|
Loading…
Reference in New Issue
Block a user