Permalink
Browse files

fix issue TypeError (can't dup NilClass) and bump version

  • Loading branch information...
1 parent ab982bb commit 203eaa2a3c6ddf49c7babdd9e0ead5036c4a7c3c @galetahub committed Aug 31, 2010
Showing with 10 additions and 13 deletions.
  1. +3 −6 app/controllers/ckeditor_controller.rb
  2. +2 −2 ckeditor.gemspec
  3. +4 −4 lib/ckeditor.rb
  4. +1 −1 lib/ckeditor/version.rb
@@ -32,12 +32,9 @@ def create
end
klass = case @kind.downcase
- # TODO: fix issue TypeError (can't dup NilClass)
- #when 'file' then Ckeditor.file_model
- #when 'image' then Ckeditor.image_model
- when 'file' then Ckeditor::AttachmentFile
- when 'image' then Ckeditor::Picture
- end
+ when 'file' then Ckeditor.file_model
+ when 'image' then Ckeditor.image_model
+ end
@record = klass.new
View
@@ -5,11 +5,11 @@
Gem::Specification.new do |s|
s.name = %q{ckeditor}
- s.version = "3.4.0"
+ s.version = "3.4.1"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Igor Galeta"]
- s.date = %q{2010-08-20}
+ s.date = %q{2010-08-31}
s.description = %q{CKEditor is a WYSIWYG editor to be used inside web pages}
s.email = %q{galeta.igor@gmail.com}
s.extra_rdoc_files = [
View
@@ -60,14 +60,14 @@ module Ckeditor
mattr_accessor :file_manager_file_model
@@file_manager_file_model = "Ckeditor::AttachmentFile"
+ # Get the image class from the image reference object.
def self.image_model
- @@image_model ||= @@file_manager_image_model.to_s.classify.constantize
- @@image_model
+ @@file_manager_image_model.to_s.classify.constantize
end
+ # Get the file class from the file reference object.
def self.file_model
- @@file_model ||= @@file_manager_file_model.to_s.classify.constantize
- @@file_model
+ @@file_manager_file_model.to_s.classify.constantize
end
# Default way to setup Ckeditor. Run rails generate ckeditor to create
View
@@ -2,7 +2,7 @@ module Ckeditor
module Version
MAJOR = 3
MINOR = 4
- RELEASE = 0
+ RELEASE = 1
def self.dup
"#{MAJOR}.#{MINOR}.#{RELEASE}"

0 comments on commit 203eaa2

Please sign in to comment.