comfortable_mexican_sofa 1.0.46 → 1.0.47

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/README.md CHANGED
@@ -115,6 +115,8 @@ Similarly you can access **Snippet** content:
115
115
 
116
116
  cms_snippet_content(:snippet_slug)
117
117
 
118
+ You can also directly access `@cms_site`, `@cms_layout` and `@cms_page` objects from helpers, partials and application layouts used in rendering of a CMS page.
119
+
118
120
  Extending Admin Area
119
121
  --------------------
120
122
 
@@ -157,7 +159,7 @@ There's a rake task that makes moving seeds into database (and vice-versa) easy:
157
159
  # from seeds into database
158
160
  rake comfortable_mexican_sofa:import:all FROM=your-site.local TO=your-site.com SEED_PATH=/path/to/seeds
159
161
 
160
- # from database to seeds
162
+ # from database to seeds
161
163
  rake comfortable_mexican_sofa:export:all FROM=your-site.com TO=your-site.local SEED_PATH=/path/to/seeds
162
164
 
163
165
  Active Components
@@ -166,7 +168,7 @@ Comfortable Mexican Sofa utilizes the following:
166
168
 
167
169
  * **[https://github.com/rails/rails](https://github.com/rails/rails)** - Ruby on Rails 3.*, of course
168
170
  * **[https://github.com/thoughtbot/paperclip](https://github.com/thoughtbot/paperclip)** - Paperclip to handle file uploads
169
- * **[https://github.com/theworkinggroup/active_link_to](https://github.com/theworkinggroup/active_link_to)** - Easy method to handle logic behind 'active' links
171
+ * **[https://github.com/twg/active_link_to](https://github.com/twg/active_link_to)** - Easy method to handle logic behind 'active' links
170
172
 
171
173
  * * *
172
174
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.46
1
+ 1.0.47
@@ -4,7 +4,7 @@ class CmsContentController < ApplicationController
4
4
  before_filter :load_cms_page, :only => :render_html
5
5
  before_filter :load_cms_layout, :only => [:render_css, :render_js]
6
6
 
7
- caches_page :render_css, :render_js, :if => ComfortableMexicanSofa.config.enable_caching
7
+ caches_page :render_css, :render_js, :if => Proc.new { |c| ComfortableMexicanSofa.config.enable_caching }
8
8
 
9
9
  def render_html(status = 200)
10
10
  layout = @cms_page.cms_layout.app_layout.blank?? false : @cms_page.cms_layout.app_layout
@@ -22,7 +22,7 @@
22
22
  <%= form.select :parent_id, options %>
23
23
  <% end %>
24
24
  <% if (options = CmsPage.options_for_select(@cms_site, @cms_page, nil, 0, false)).present? %>
25
- <%= form.select :target_page_id, options, :include_blank => true, :label => 'Redirect To Page' %>
25
+ <%= form.select :target_page_id, [['---- No Redirect ----', nil]] + options, :label => 'Redirect To Page' %>
26
26
  <% end %>
27
27
  <%= cms_hook :page_form, :object => form %>
28
28
  </div>
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{comfortable_mexican_sofa}
8
- s.version = "1.0.46"
8
+ s.version = "1.0.47"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Oleg Khabarov", "The Working Group Inc"]
12
- s.date = %q{2011-02-22}
12
+ s.date = %q{2011-03-03}
13
13
  s.description = %q{}
14
14
  s.email = %q{oleg@theworkinggroup.ca}
15
15
  s.extra_rdoc_files = [
@@ -18,7 +18,7 @@ module CmsTag
18
18
  # /\{\{\s*?cms:page:(\w+)\}\}/
19
19
  # will match tags like these:
20
20
  # {{cms:page:my_label}}
21
- def regex_tag_signature
21
+ def regex_tag_signature(label = nil)
22
22
  nil
23
23
  end
24
24
 
@@ -56,7 +56,7 @@ module CmsTag
56
56
  # Example:
57
57
  # /<\{\s*?cms:page:tag_label\}/
58
58
  def regex_tag_signature
59
- nil
59
+ self.class.regex_tag_signature(label)
60
60
  end
61
61
 
62
62
  # Content that is accociated with Tag instance.
@@ -7,10 +7,6 @@ class CmsTag::FieldDateTime < CmsBlock
7
7
  /\{\{\s*cms:field:(#{label}):datetime\s*\}\}/
8
8
  end
9
9
 
10
- def regex_tag_signature
11
- self.class.regex_tag_signature(label)
12
- end
13
-
14
10
  def content=(value)
15
11
  write_attribute(:content, value)
16
12
  end
@@ -7,10 +7,6 @@ class CmsTag::FieldInteger < CmsBlock
7
7
  /\{\{\s*cms:field:(#{label}):integer\s*\}\}/
8
8
  end
9
9
 
10
- def regex_tag_signature
11
- self.class.regex_tag_signature(label)
12
- end
13
-
14
10
  def content=(value)
15
11
  write_attribute(:content, value)
16
12
  end
@@ -7,10 +7,6 @@ class CmsTag::FieldString < CmsBlock
7
7
  /\{\{\s*cms:field:(#{label}):?(?:string)?\s*\}\}/
8
8
  end
9
9
 
10
- def regex_tag_signature
11
- self.class.regex_tag_signature(label)
12
- end
13
-
14
10
  def content=(value)
15
11
  write_attribute(:content, value)
16
12
  end
@@ -7,10 +7,6 @@ class CmsTag::FieldText < CmsBlock
7
7
  /\{\{\s*cms:field:(#{label}):?(?:text)?\s*?\}\}/
8
8
  end
9
9
 
10
- def regex_tag_signature
11
- self.class.regex_tag_signature(label)
12
- end
13
-
14
10
  def content=(value)
15
11
  write_attribute(:content, value)
16
12
  end
@@ -9,10 +9,6 @@ class CmsTag::Helper
9
9
  /\{\{\s*cms:helper:(#{label}):?(.*?)\s*\}\}/
10
10
  end
11
11
 
12
- def regex_tag_signature
13
- self.class.regex_tag_signature(label)
14
- end
15
-
16
12
  def content
17
13
  "<%= #{label}(#{params.split(':').collect{|p| "'#{p}'"}.join(', ')}) %>"
18
14
  end
@@ -7,10 +7,6 @@ class CmsTag::PageDateTime < CmsBlock
7
7
  /\{\{\s*cms:page:(#{label}):datetime\s*\}\}/
8
8
  end
9
9
 
10
- def regex_tag_signature
11
- self.class.regex_tag_signature(label)
12
- end
13
-
14
10
  def content=(value)
15
11
  write_attribute(:content, value)
16
12
  end
@@ -7,10 +7,6 @@ class CmsTag::PageInteger < CmsBlock
7
7
  /\{\{\s*cms:page:(#{label}):integer\s*\}\}/
8
8
  end
9
9
 
10
- def regex_tag_signature
11
- self.class.regex_tag_signature(label)
12
- end
13
-
14
10
  def content=(value)
15
11
  write_attribute(:content, value)
16
12
  end
@@ -7,10 +7,6 @@ class CmsTag::PageRichText < CmsBlock
7
7
  /\{\{\s*cms:page:(#{label}):rich_text\s*\}\}/
8
8
  end
9
9
 
10
- def regex_tag_signature
11
- self.class.regex_tag_signature(label)
12
- end
13
-
14
10
  def content=(value)
15
11
  write_attribute(:content, value)
16
12
  end
@@ -7,10 +7,6 @@ class CmsTag::PageString < CmsBlock
7
7
  /\{\{\s*cms:page:(#{label}):string\s*\}\}/
8
8
  end
9
9
 
10
- def regex_tag_signature
11
- self.class.regex_tag_signature(label)
12
- end
13
-
14
10
  def content=(value)
15
11
  write_attribute(:content, value)
16
12
  end
@@ -7,10 +7,6 @@ class CmsTag::PageText < CmsBlock
7
7
  /\{\{\s*cms:page:(#{label}):?(?:text)?\s*\}\}/
8
8
  end
9
9
 
10
- def regex_tag_signature
11
- self.class.regex_tag_signature(label)
12
- end
13
-
14
10
  def content=(value)
15
11
  write_attribute(:content, value)
16
12
  end
@@ -9,10 +9,6 @@ class CmsTag::Partial
9
9
  /\{\{\s*cms:partial:(#{label}):?(.*?)\s*\}\}/
10
10
  end
11
11
 
12
- def regex_tag_signature
13
- self.class.regex_tag_signature(label)
14
- end
15
-
16
12
  def content
17
13
  ps = params.split(':').collect_with_index{|p, i| ":param_#{i+1} => '#{p}'"}.join(', ')
18
14
  "<%= render :partial => '#{label}'#{ps.blank?? nil : ", :locals => {#{ps}}"} %>"
@@ -11,10 +11,6 @@ class CmsTag::Snippet < CmsSnippet
11
11
  /\{\{\s*cms:snippet:(#{label})\s*\}\}/
12
12
  end
13
13
 
14
- def regex_tag_signature
15
- self.class.regex_tag_signature(label)
16
- end
17
-
18
14
  def content
19
15
  self.read_attribute(:content)
20
16
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 0
8
- - 46
9
- version: 1.0.46
8
+ - 47
9
+ version: 1.0.47
10
10
  platform: ruby
11
11
  authors:
12
12
  - Oleg Khabarov
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-22 00:00:00 -05:00
18
+ date: 2011-03-03 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -384,7 +384,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
384
384
  requirements:
385
385
  - - ">="
386
386
  - !ruby/object:Gem::Version
387
- hash: 680801473721567613
387
+ hash: 4181913889619670678
388
388
  segments:
389
389
  - 0
390
390
  version: "0"