publinator 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/app/models/publinator/page.rb +1 -1
- data/app/views/publinator/manage/pages/_form.html.erb +1 -1
- data/app/views/publinator/manage/pages/show.html.erb +1 -1
- data/config/routes.rb +0 -1
- data/db/migrate/20120725194854_create_publinator_sites.rb +1 -1
- data/db/migrate/20120725201842_create_publinator_publications.rb +2 -1
- data/lib/publinator/version.rb +1 -1
- metadata +3 -3
@@ -2,7 +2,7 @@ module Publinator
|
|
2
2
|
class Page < ActiveRecord::Base
|
3
3
|
self.table_name = 'publinator_pages'
|
4
4
|
acts_as_publishable
|
5
|
-
attr_accessible :body, :kicker, :subtitle, :teaser, :title, :section, :asset_items
|
5
|
+
attr_accessible :body, :kicker, :subtitle, :teaser, :title, :section, :asset_items, :asset_item, :asset_file
|
6
6
|
|
7
7
|
def asset_types
|
8
8
|
['header']
|
@@ -13,7 +13,7 @@
|
|
13
13
|
<%= form.semantic_fields_for :asset_items do |asset_form| %>
|
14
14
|
<%= asset_form.inputs "Asset" do %>
|
15
15
|
<%= asset_form.input :asset_type, :as => :select, :collection => @page.asset_types %>
|
16
|
-
<%= asset_form.input :
|
16
|
+
<%= asset_form.input :asset, :as => :file %>
|
17
17
|
<% end %>
|
18
18
|
<% end %>
|
19
19
|
<% end %>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<h1><%= @page.title %></h1>
|
3
3
|
|
4
4
|
<% @page.asset_types.each do |ai| %>
|
5
|
-
<%=
|
5
|
+
<%= image_tag @page.asset_files("header").first.asset.url if @page.asset_files("header") && @page.asset_files("header").first %>
|
6
6
|
<% end %>
|
7
7
|
|
8
8
|
<p>
|
data/config/routes.rb
CHANGED
@@ -6,7 +6,6 @@ Publinator::Engine.routes.draw do
|
|
6
6
|
|
7
7
|
Publinator::PublishableType.all.each do |pt|
|
8
8
|
resources pt.name.pluralize.downcase.to_sym, :controller => "publishable", :publishable_type => pt.name.pluralize.downcase
|
9
|
-
#match "/#{pt.name.pluralize.downcase}" => "publishable#index", :as => pt.name.pluralize.downcase, :publishable_type => pt.name
|
10
9
|
end
|
11
10
|
|
12
11
|
#constraints(Publinator::PublishableType) do
|
@@ -10,7 +10,8 @@ class CreatePublinatorPublications < ActiveRecord::Migration
|
|
10
10
|
t.datetime :publish_at
|
11
11
|
t.datetime :unpublish_at
|
12
12
|
t.datetime :archive_at
|
13
|
-
t.
|
13
|
+
t.string :publishable_type
|
14
|
+
t.integer :publishable_id
|
14
15
|
t.boolean :default
|
15
16
|
|
16
17
|
t.timestamps
|
data/lib/publinator/version.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.9
|
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: -632280237461656463
|
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: -632280237461656463
|
363
363
|
requirements: []
|
364
364
|
rubyforge_project:
|
365
365
|
rubygems_version: 1.8.24
|