publinator 0.0.12 → 0.0.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/app/controllers/publinator/publishable_controller.rb +1 -4
- data/app/helpers/publinator/application_helper.rb +0 -3
- data/app/models/publinator/page.rb +1 -0
- data/app/models/publinator/publication.rb +0 -2
- data/app/models/publinator/publishable_type.rb +0 -2
- data/app/views/publinator/manage/publishable/_form.html.erb +0 -1
- data/app/views/publinator/manage/sites/_form.html.erb +1 -2
- data/app/views/publinator/publishable/index.html.erb +2 -2
- data/lib/publinator/version.rb +1 -1
- data/lib/publinator.rb +0 -1
- metadata +3 -3
@@ -4,11 +4,8 @@ module Publinator
|
|
4
4
|
class PublishableController < Publinator::ApplicationController
|
5
5
|
def index
|
6
6
|
@publication = Publinator::Publication.find_by_publishable_type_and_slug(params[:publishable_type].classify, 'index')
|
7
|
-
if @publication
|
8
|
-
logger.info "looking for publication with slug #{params[:publishable_type]}"
|
9
|
-
@publication = Publinator::Publication.find_by_slug(params[:publishable_type])
|
7
|
+
if @publication
|
10
8
|
@publishable = @publication.publishable
|
11
|
-
logger.info @publication.to_yaml
|
12
9
|
begin
|
13
10
|
render "#{params[:publishable_type]}/show"
|
14
11
|
rescue ActionView::MissingTemplate
|
@@ -12,7 +12,6 @@ module Publinator
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def menu_section(title, path = "", collection)
|
15
|
-
logger.info "Generating Menu Section for #{title}"
|
16
15
|
if path.blank?
|
17
16
|
ct = "
|
18
17
|
<li id=\"#{title.underscore}\">#{title}<br>\n"
|
@@ -28,8 +27,6 @@ module Publinator
|
|
28
27
|
end
|
29
28
|
ct += "</ul>
|
30
29
|
</div>"
|
31
|
-
else
|
32
|
-
logger.info "collection: #{ collection } did not generate a submenu."
|
33
30
|
end
|
34
31
|
ct += "</li>"
|
35
32
|
ct.html_safe
|
@@ -25,7 +25,6 @@ module Publinator
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def generate_slug
|
28
|
-
logger.info "generating slug"
|
29
28
|
if self.slug.blank? || slug =~ /temporary_slug\d?/
|
30
29
|
if default
|
31
30
|
self.slug = 'index'
|
@@ -42,7 +41,6 @@ module Publinator
|
|
42
41
|
self.slug = "temporary_slug_#{rand(100000)}"
|
43
42
|
end
|
44
43
|
end
|
45
|
-
logger.info "slug is #{ slug }"
|
46
44
|
end
|
47
45
|
|
48
46
|
def self.get_by_slug(slug)
|
@@ -3,8 +3,6 @@ module Publinator
|
|
3
3
|
attr_accessible :name, :sluggable, :layout
|
4
4
|
|
5
5
|
def self.matches?(request)
|
6
|
-
logger.info request.path_parameters
|
7
|
-
logger.info request.path_parameters[:publishable_type]
|
8
6
|
pt = self.find_by_name(request.path_parameters[:publishable_type].singularize.capitalize)
|
9
7
|
return pt.present?
|
10
8
|
end
|
@@ -1,6 +1,5 @@
|
|
1
1
|
<%= semantic_form_for [:manage, @publishable], :html => { :multipart => true } do |form| %>
|
2
2
|
<% if @publishable.errors && @publishable.errors.count > 0 %>
|
3
|
-
<% logger.info @publishable_errors.to_yaml %>
|
4
3
|
<% @publishable.errors.full_messages.each do |e| %>
|
5
4
|
<%= e %><br>
|
6
5
|
<% end %>
|
@@ -1,3 +1,3 @@
|
|
1
|
-
<h1><%= params["publishable_type"].
|
1
|
+
<h1><%= params["publishable_type"].humanize.titleize %></h1>
|
2
2
|
|
3
|
-
<%= render :collection => @publishables, :partial => "summary" %>
|
3
|
+
<%= render :collection => @publishables, :partial => "summary" %>
|
data/lib/publinator/version.rb
CHANGED
data/lib/publinator.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: publinator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.13
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -350,7 +350,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
350
350
|
version: '0'
|
351
351
|
segments:
|
352
352
|
- 0
|
353
|
-
hash:
|
353
|
+
hash: -369282763332865225
|
354
354
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
355
355
|
none: false
|
356
356
|
requirements:
|
@@ -359,7 +359,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
359
359
|
version: '0'
|
360
360
|
segments:
|
361
361
|
- 0
|
362
|
-
hash:
|
362
|
+
hash: -369282763332865225
|
363
363
|
requirements: []
|
364
364
|
rubyforge_project:
|
365
365
|
rubygems_version: 1.8.24
|