fesplugas-typus 0.9.12 → 0.9.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.12
1
+ 0.9.13
@@ -39,6 +39,8 @@ class Admin::MasterController < ApplicationController
39
39
  before_filter :set_tiny_mce,
40
40
  :only => [ :new, :edit, :create, :update ]
41
41
 
42
+ helper_method :tiny_mce_plugin_installed?
43
+
42
44
  ##
43
45
  # This is the main index of the model. With filters, conditions
44
46
  # and more.
@@ -293,7 +295,7 @@ private
293
295
  end
294
296
 
295
297
  def set_tiny_mce
296
- unless @resource[:class].typus_tiny_mce_fields.empty?
298
+ if !@resource[:class].typus_tiny_mce_fields.empty? && tiny_mce_plugin_installed?
297
299
  options = @resource[:class].typus_tiny_mce_options
298
300
  self.class.class_eval { uses_tiny_mce :options => options }
299
301
  end
@@ -349,4 +351,8 @@ private
349
351
  redirect_to path
350
352
  end
351
353
 
354
+ def tiny_mce_plugin_installed?
355
+ defined?(TinyMCE)
356
+ end
357
+
352
358
  end
@@ -14,6 +14,7 @@
14
14
  <%= yield :stylesheets -%>
15
15
 
16
16
  <%= javascript_include_tag 'admin/application' %>
17
+ <%= include_tiny_mce_if_needed if tiny_mce_plugin_installed? %>
17
18
  <%= yield :javascripts -%>
18
19
 
19
20
  </head>
data/typus.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{typus}
5
- s.version = "0.9.12"
5
+ s.version = "0.9.13"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Francesc Esplugas"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fesplugas-typus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.12
4
+ version: 0.9.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Francesc Esplugas