beef-articles 0.3.33 → 0.3.34

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.33
1
+ 0.3.34
@@ -85,8 +85,13 @@ class Admin::ArticlesController < Admin::BaseController
85
85
  end
86
86
 
87
87
  def preview
88
- @article = Article.find(params[:id])
89
- @article.attributes = params[:article]
88
+ unless params[:id].nil?
89
+ @article = Article.find(params[:id])
90
+ @article.attributes = params[:article]
91
+ else
92
+ @article = Article.new(params[:article])
93
+ end
94
+
90
95
  session[:article_preview] = @article.attributes
91
96
  end
92
97
  end
@@ -10,8 +10,8 @@ class ArticlesController < ApplicationController
10
10
  if params[:tag]
11
11
  @page_title << " tagged with '#{params[:tag]}'"
12
12
  end
13
- if params[:user_id]
14
- @user = User.find_by_permalink(params[:user_id])
13
+ if params[:permalink]
14
+ @user = User.find_by_permalink(params[:permalink])
15
15
  @page_title << " writen by #{@user.name}"
16
16
  end
17
17
  if params[:year]
data/articles.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{articles}
8
- s.version = "0.3.33"
8
+ s.version = "0.3.34"
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-09-24}
12
+ s.date = %q{2009-09-25}
13
13
  s.email = %q{steve@wearebeef.co.uk}
14
14
  s.extra_rdoc_files = [
15
15
  "LICENSE",
data/config/routes.rb CHANGED
@@ -4,8 +4,8 @@ ActionController::Routing::Routes.draw do |map|
4
4
  map.with_options :controller => 'articles', :action => 'index' do |articles|
5
5
  articles.articles_tagged 'articles/tagged/:tag'
6
6
  articles.articles_tagged_format 'articles/tagged/:tag.:format'
7
- articles.articles_authored 'articles/author/:user_id'
8
- articles.articles_authored_format 'articles/author/:user_id.:format'
7
+ articles.articles_authored 'articles/author/:permalink'
8
+ articles.articles_authored_format 'articles/author/:permalink.:format'
9
9
  articles.articles_day 'articles/:year/:month/:day',
10
10
  :year => /\d{4}/, :month => /\d{1,2}/, :day => /\d{1,2}/
11
11
  articles.articles_month 'articles/:year/:month',
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.3.33
4
+ version: 0.3.34
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-09-24 00:00:00 -07:00
12
+ date: 2009-09-25 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency