Compare commits

...
Sign in to create a new pull request.

15 commits

Author SHA1 Message Date
Uģis Ozols
48cdc50e31 Merge pull request #233 from resolve/comment_mailer
Remove seemingly hacky comment_mailer model.
2012-05-14 21:57:47 -07:00
Uģis Ozols
e1d6eb4ef1 Merge pull request #232 from resolve/deprecations
Fixed deprecation warnings
2012-05-14 20:58:48 -07:00
Philip Arndt
7856e98f6a Do we really need a model called comment_mailer? 2012-05-15 12:25:49 +12:00
Philip Arndt
6359997b05 fixed deprecation warnings 2012-05-15 12:22:31 +12:00
Philip Arndt
940046daf6 Incrementing version to 2.0.4 as I wasn't up to date with git when I pushed that last gem :( 2012-05-14 16:59:06 +12:00
Philip Arndt
b335ea5482 Increment version to 2.0.3 2012-05-14 16:58:11 +12:00
Pete Higgins
172134f971 Fix MassAssignmentSecurity::Error in integration test. 2012-04-20 14:43:35 +03:00
Matt Garrison
e9406d2693 Adding attr_accessible for Rails 3.2 mass assignment fixes. 2012-04-20 14:41:13 +03:00
Uģis Ozols
6cbf130c83 Notification recipients should be specified using :to instead of :recipients. Fixes #226. 2012-04-19 17:43:11 +03:00
Philip Arndt
01fa464c33 Merge pull request #222 from wakeless/fix-page-caching-2-0
Fix page caching on index when pages param is present.
2012-04-10 21:20:04 -07:00
Michael Gall
87b9aacb98 Fix page caching on index when pages param is present.
fixes #145

Conflicts:

	app/controllers/refinery/blog/posts_controller.rb
2012-04-11 14:16:29 +10:00
Philip Arndt
93c2726f0b We can now depend on refinerycms ~> 2.0.3 and mark this as version 2.0.2 2012-04-06 22:29:27 +12:00
Philip Arndt
5b0828b408 Specify a minimum version of refinerycms and Gemfile it so that it can be used to test the next release. 2012-03-27 12:53:32 +13:00
Philip Arndt
822c933f56 Update seo_meta dependency to ~> 1.3.0 2012-03-27 12:13:07 +13:00
Uģis Ozols
bb900f1995 Add rake db:seed to install steps. 2012-03-09 17:07:41 +02:00
15 changed files with 24 additions and 18 deletions

View file

@ -2,7 +2,7 @@ source "http://rubygems.org"
gemspec
gem 'refinerycms', '~> 2.0.0'
gem 'refinerycms', '~> 2.0.3'
group :development, :test do
require 'rbconfig'

View file

@ -2,7 +2,7 @@ module Refinery
module Blog
class PostsController < BlogController
caches_page :index
caches_page :index, :unless => proc {|c| c.refinery_user_signed_in? || c.flash.any? || params[:page].present? }
before_filter :find_all_blog_posts, :except => [:archive]
before_filter :find_blog_post, :only => [:show, :comment, :update_nav]

View file

@ -5,7 +5,7 @@ module Refinery
def notification(comment, request)
@comment = comment
mail :subject => Blog::Comment::Notification.subject,
:recipients => Blog::Comment::Notification.recipients,
:to => Blog::Comment::Notification.recipients,
:from => "\"#{Refinery::Core.site_name}\" <no-reply@#{request.domain}>"
end

View file

@ -11,6 +11,8 @@ module Refinery
validates :title, :presence => true, :uniqueness => true
attr_accessible :title
def post_count
posts.select(&:live?).count
end
@ -20,4 +22,4 @@ module Refinery
end
end
end
end

View file

@ -1 +0,0 @@
require File.expand_path('../../../../mailers/refinery/blog/comment_mailer', __FILE__)

View file

@ -4,6 +4,7 @@ module Refinery
self.table_name = 'refinery_blog_categories_blog_posts'
belongs_to :blog_post, :class_name => 'Refinery::Blog::Post', :foreign_key => :blog_post_id
belongs_to :blog_category, :class_name => 'Refinery::Blog::Category', :foreign_key => :blog_category_id
attr_accessible :blog_category_id, :blog_post_id
end
end

View file

@ -1,6 +1,6 @@
<% content_for :body_content_title, @category.title %>
<% content_for :body_content_left do %>
<% content_for :body do %>
<% if @posts.any? %>
<section id="blog_posts">
<%= render :partial => "/refinery/blog/shared/post", :collection => @posts %>
@ -13,7 +13,7 @@
<% end %>
<% end %>
<% content_for :body_content_right do %>
<% content_for :side_body do %>
<%= render :partial => "/refinery/blog/shared/categories" %>
<% end %>

View file

@ -1,6 +1,6 @@
<% content_for :title, "#{t('.blog_archive_for', :date => @archive_date.strftime('%B %Y'))}" %>
<% content_for :body_content_left do %>
<% content_for :body do %>
<h1><%= t('.blog_archive_for', :date => @archive_date.strftime('%B %Y')) %></h1>
<% if @posts.any? %>
<section id="blog_posts">

View file

@ -1,4 +1,4 @@
<% content_for :body_content_left do %>
<% content_for :body do %>
<%= raw @page.content_for(Refinery::Pages.default_parts.first.to_sym) if Refinery::Pages.default_parts.any? %>
<% if @posts.any? %>

View file

@ -1,4 +1,4 @@
<% content_for :body_content_left do %>
<% content_for :body do %>
<div id="show_blog_post">
<%= render 'post' %>
</div>

View file

@ -2,7 +2,7 @@
<% content_for :body_content_title, "#{t('.posts_tagged')} &#8220;#{@tag_name.titleize}&#8221;".html_safe -%>
<% content_for :body_content_left do %>
<% content_for :body do %>
<% if @posts.any? %>
<section id="blog_posts">
<%= render :partial => "/refinery/blog/shared/post", :collection => @posts %>

View file

@ -1,4 +1,4 @@
<% content_for :body_content_right do %>
<% content_for :side_body do %>
<%= yield(:body_content_right_prepend) %>
<%= render :partial => "/refinery/blog/shared/rss_feed" %>
<%= render :partial => "/refinery/blog/shared/categories" %>

View file

@ -3,7 +3,7 @@ module Refinery
class Version
@major = 2
@minor = 0
@tiny = 1
@tiny = 4
class << self
attr_reader :major, :minor, :tiny

View file

@ -27,10 +27,14 @@ Next, to install the blog plugin run:
rails generate refinery:blog
Finally migrate your database and you're done.
Run database migrations:
rake db:migrate
Finally seed your database and you're done.
rake db:seed
## Developing & Contributing
The version of Refinery to develop this engine against is defined in the gemspec. To override the version of refinery to develop against, edit the project Gemfile to point to a local path containing a clone of refinerycms.

View file

@ -18,11 +18,11 @@ Gem::Specification.new do |s|
s.test_files = `git ls-files -- spec/*`.split("\n")
# Runtime dependencies
s.add_dependency 'refinerycms-core', '~> 2.0.1'
s.add_dependency 'refinerycms-core', '~> 2.0.3'
s.add_dependency 'refinerycms-settings', '~> 2.0.1'
s.add_dependency 'filters_spam', '~> 0.2'
s.add_dependency 'acts-as-taggable-on'
s.add_dependency 'seo_meta', '~> 1.2.0'
s.add_dependency 'seo_meta', '~> 1.3.0'
s.add_dependency 'rails_autolink'
# Development dependencies