beef-articles 0.4.5 → 0.4.6
Sign up to get free protection for your applications and to get access to all the features.
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.6
|
@@ -85,13 +85,9 @@ class Admin::ArticlesController < Admin::BaseController
|
|
85
85
|
end
|
86
86
|
|
87
87
|
def preview
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
@article = Article.new(params[:article])
|
93
|
-
end
|
94
|
-
|
95
|
-
session[:article_preview] = @article.attributes
|
88
|
+
preview_params = params[:news_article]
|
89
|
+
article = Article.find_by_id(params[:id])
|
90
|
+
preview_params.reverse_merge!(article.attributes) if article
|
91
|
+
session[:article_preview] = preview_params
|
96
92
|
end
|
97
93
|
end
|
@@ -33,6 +33,8 @@ class ArticlesController < ApplicationController
|
|
33
33
|
|
34
34
|
def show
|
35
35
|
@article = Article.published.find_by_permalink(params[:year], params[:month], params[:day], params[:permalink])
|
36
|
+
@images = @article.assets.images
|
37
|
+
@documents = @article.assets.documents
|
36
38
|
|
37
39
|
@page_title = @article.title
|
38
40
|
@page_description = @article.description
|
@@ -49,6 +51,11 @@ class ArticlesController < ApplicationController
|
|
49
51
|
def preview
|
50
52
|
@page_class = 'show'
|
51
53
|
@article = Article.new(session[:article_preview])
|
54
|
+
@images = Asset.images.all(:conditions => {:id => session[:article_preview][:asset_ids] })
|
55
|
+
@documents = Asset.documents.all(:conditions => {:id => session[:article_preview][:asset_ids] })
|
56
|
+
|
57
|
+
RAILS_DEFAULT_LOGGER.debug session[:article_preview].inspect
|
58
|
+
|
52
59
|
@article.id = 0
|
53
60
|
@article.published_at = Time.now
|
54
61
|
@article.created_by = current_user
|
@@ -16,9 +16,9 @@
|
|
16
16
|
|
17
17
|
<%= render :partial => 'meta', :locals => {:article => @article } %>
|
18
18
|
|
19
|
-
<%= gallery @
|
19
|
+
<%= gallery @images %>
|
20
20
|
|
21
|
-
<%= documents @
|
21
|
+
<%= documents @documents %>
|
22
22
|
|
23
23
|
<h4 id="share-title" title="Share This Article">Share This</h4>
|
24
24
|
<p class="share-links">
|
@@ -0,0 +1,87 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{beef-articles}
|
8
|
+
s.version = "0.4.6"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Steve England"]
|
12
|
+
s.date = %q{2010-02-19}
|
13
|
+
s.email = %q{steve@wearebeef.co.uk}
|
14
|
+
s.extra_rdoc_files = [
|
15
|
+
"LICENSE",
|
16
|
+
"README.rdoc"
|
17
|
+
]
|
18
|
+
s.files = [
|
19
|
+
".document",
|
20
|
+
".gitignore",
|
21
|
+
"LICENSE",
|
22
|
+
"README.rdoc",
|
23
|
+
"Rakefile",
|
24
|
+
"VERSION",
|
25
|
+
"app/controllers/admin/articles_controller.rb",
|
26
|
+
"app/controllers/admin/categories_controller.rb",
|
27
|
+
"app/controllers/admin/comments_controller.rb",
|
28
|
+
"app/controllers/articles_controller.rb",
|
29
|
+
"app/controllers/comments_controller.rb",
|
30
|
+
"app/helpers/articles_helper.rb",
|
31
|
+
"app/helpers/comments_helper.rb",
|
32
|
+
"app/models/article.rb",
|
33
|
+
"app/models/category.rb",
|
34
|
+
"app/models/comment.rb",
|
35
|
+
"app/views/admin/articles/index.html.erb",
|
36
|
+
"app/views/admin/articles/preview.js.rjs",
|
37
|
+
"app/views/admin/articles/show.html.erb",
|
38
|
+
"app/views/admin/categories/index.html.erb",
|
39
|
+
"app/views/admin/categories/show.html.erb",
|
40
|
+
"app/views/admin/comments/index.html.erb",
|
41
|
+
"app/views/articles/_article.html.erb",
|
42
|
+
"app/views/articles/_meta.html.erb",
|
43
|
+
"app/views/articles/index.html.erb",
|
44
|
+
"app/views/articles/index.rss.builder",
|
45
|
+
"app/views/articles/show.html.erb",
|
46
|
+
"app/views/comments/_comment.html.erb",
|
47
|
+
"app/views/comments/_form.html.erb",
|
48
|
+
"app/views/comments/new.html.erb",
|
49
|
+
"beef-articles.gemspec",
|
50
|
+
"config/routes.rb",
|
51
|
+
"generators/articles_migration/articles_migration_generator.rb",
|
52
|
+
"generators/articles_migration/templates/migration.rb",
|
53
|
+
"lib/articles.rb",
|
54
|
+
"rails/init.rb",
|
55
|
+
"test/articles_test.rb",
|
56
|
+
"test/database.yml",
|
57
|
+
"test/schema.rb",
|
58
|
+
"test/test_helper.rb"
|
59
|
+
]
|
60
|
+
s.homepage = %q{http://github.com/beef/articles}
|
61
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
62
|
+
s.require_paths = ["lib"]
|
63
|
+
s.rubygems_version = %q{1.3.5}
|
64
|
+
s.summary = %q{Article/Blogging engine}
|
65
|
+
s.test_files = [
|
66
|
+
"test/articles_test.rb",
|
67
|
+
"test/test_helper.rb",
|
68
|
+
"test/schema.rb"
|
69
|
+
]
|
70
|
+
|
71
|
+
if s.respond_to? :specification_version then
|
72
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
73
|
+
s.specification_version = 3
|
74
|
+
|
75
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
76
|
+
s.add_runtime_dependency(%q<mbleigh-acts-as-taggable-on>, [">= 0"])
|
77
|
+
s.add_runtime_dependency(%q<jackdempsey-acts_as_commentable>, [">= 0"])
|
78
|
+
else
|
79
|
+
s.add_dependency(%q<mbleigh-acts-as-taggable-on>, [">= 0"])
|
80
|
+
s.add_dependency(%q<jackdempsey-acts_as_commentable>, [">= 0"])
|
81
|
+
end
|
82
|
+
else
|
83
|
+
s.add_dependency(%q<mbleigh-acts-as-taggable-on>, [">= 0"])
|
84
|
+
s.add_dependency(%q<jackdempsey-acts_as_commentable>, [">= 0"])
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beef-articles
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.6
|
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: 2010-02-
|
12
|
+
date: 2010-02-19 00:00:00 +00:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -72,6 +72,7 @@ files:
|
|
72
72
|
- app/views/comments/_comment.html.erb
|
73
73
|
- app/views/comments/_form.html.erb
|
74
74
|
- app/views/comments/new.html.erb
|
75
|
+
- beef-articles.gemspec
|
75
76
|
- config/routes.rb
|
76
77
|
- generators/articles_migration/articles_migration_generator.rb
|
77
78
|
- generators/articles_migration/templates/migration.rb
|