app/models/theme.rb in knitkit-2.0.10 vs app/models/theme.rb in knitkit-2.0.11
- old
+ new
@@ -6,10 +6,11 @@
class << self; attr_accessor :base_layouts_views_path, :knitkit_website_stylesheets_path, :knitkit_website_images_path end
@base_layouts_views_path = "#{Knitkit::Engine.root.to_s}/app/views"
@knitkit_website_stylesheets_path = "#{Knitkit::Engine.root.to_s}/public/stylesheets/knitkit"
@knitkit_website_images_path = "#{Knitkit::Engine.root.to_s}/public/images/knitkit"
+ protected_with_capabilities
has_file_assets
class << self
def root_dir
@@root_dir ||= "#{Rails.root}/public"
@@ -52,10 +53,10 @@
has_permalink :name, :theme_id, :scope => :website_id,
:only_when_blank => false, :sync_url => true
validates :name, :presence => {:message => 'Name cannot be blank'}
- validates_uniqueness_of :theme_id, :scope => :website_id
+ validates_uniqueness_of :theme_id, :scope => :website_id, :case_sensitive => false
before_destroy :delete_theme_files!
def path
"#{self.class.base_dir(website)}/#{theme_id}"