acts_as_content_node 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.8
|
@@ -1,15 +1,15 @@
|
|
1
1
|
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{acts_as_content_node}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.8"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Steve England"]
|
12
|
-
s.date = %q{2009-10-
|
12
|
+
s.date = %q{2009-10-30}
|
13
13
|
s.description = %q{Common functions for a record used as content of a website. Generator for cms and front end.}
|
14
14
|
s.email = %q{steve@wearebeef.co.uk}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -72,3 +72,4 @@ Gem::Specification.new do |s|
|
|
72
72
|
else
|
73
73
|
end
|
74
74
|
end
|
75
|
+
|
@@ -1,14 +1,14 @@
|
|
1
1
|
<fieldset>
|
2
2
|
<legend>Publishing Options</legend>
|
3
3
|
<p>
|
4
|
-
|
4
|
+
<%= f.label :published_at, "Publish at" %><br/>
|
5
5
|
<%= check_box_tag 'live', true, params[:live], :onclick => 'toggle_published_at(this.checked)', :id => 'live-from' %>
|
6
|
-
<span id="published_at"><%= f.datetime_select
|
6
|
+
<span id="published_at"><%= f.datetime_select :published_at, :disabled => params[:live] ? nil : 'disabled' %></span>
|
7
7
|
</p>
|
8
8
|
|
9
9
|
<p>
|
10
|
-
|
10
|
+
<%= f.label :published_to, "Publish till" %><br/>
|
11
11
|
<%= check_box_tag 'live', true, params[:live], :onclick => 'toggle_published_to(this.checked)', :id => 'live-to' %>
|
12
|
-
<span id="published_to"><%= f.datetime_select
|
12
|
+
<span id="published_to"><%= f.datetime_select :published_to, :disabled => params[:live] ? nil : 'disabled' %></span>
|
13
13
|
</p>
|
14
14
|
</fieldset>
|
@@ -5,7 +5,7 @@ module Beef
|
|
5
5
|
def acts_as_publishable
|
6
6
|
send :include, InstanceMethods
|
7
7
|
|
8
|
-
named_scope :published, lambda { { :conditions => ["(published_at IS NOT NULL AND published_at != '') AND published_at
|
8
|
+
named_scope :published, lambda { { :conditions => ["(published_at IS NOT NULL AND published_at != '') AND published_at <= ? AND (published_to > ? OR published_to IS NULL OR published_to = '')", Time.now, Time.now] } }
|
9
9
|
named_scope :draft, :conditions => { :published_at => nil }
|
10
10
|
|
11
11
|
before_save :set_published
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acts_as_content_node
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steve England
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-10-
|
12
|
+
date: 2009-10-30 00:00:00 +00:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|