governor 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.2
1
+ 0.2.3
@@ -1,11 +1,11 @@
1
- <h1><%= link_to_unless_current resource.title, resource %></h1>
1
+ <h1><%= link_to_unless_current article.title, article %></h1>
2
2
  <div class='subtitle'>
3
3
  <div class='desc'>
4
- <%= resource.description %>
5
- <%= render_plugin_partial(:after_article_description, :locals => {:article => resource}) %>
4
+ <%= article.description %>
5
+ <%= render_plugin_partial(:after_article_description, :locals => {:article => article}) %>
6
6
  </div>
7
7
  <div class='date'>
8
- posted <%= show_time_ago resource.created_at %>
8
+ posted <%= show_time_ago article.created_at %>
9
9
  </div>
10
10
  </div>
11
- <%= Governor::Formatters.format_article resource %>
11
+ <%= Governor::Formatters.format_article article %>
@@ -1,6 +1,3 @@
1
1
  <h1>Editing article</h1>
2
2
 
3
3
  <%= render :partial => 'form' %>
4
-
5
- <%= link_to 'Show', resource %> |
6
- <%= link_to 'Back', polymorphic_path(mapping.plural) %>
@@ -1,6 +1,6 @@
1
- <h1>List</h1>
2
- <% resources.each do |resource| %>
3
- <%= link_to resource.title, resource %><br>
4
- <% end %>
1
+ <% if resources.blank? %><%= (@blank_msg or "There are no articles for this time period.") %><% end %>
2
+ <%= render :partial => 'article', :collection => resources %>
5
3
 
6
- <p><%= link_to 'New', polymorphic_path(mapping.singular, :action => :new) %></p>
4
+ <p>
5
+ <%= will_paginate resources %>
6
+ </p>
@@ -2,4 +2,3 @@
2
2
 
3
3
  <%= render :partial => 'form' %>
4
4
 
5
- <%= link_to 'Back', polymorphic_path(mapping.plural) %>
@@ -1,13 +1,12 @@
1
1
  <div id="blog">
2
2
  <div class="articles">
3
- <%= render resource %>
3
+ <%= render :partial => 'article', :object => resource %>
4
4
  </div>
5
5
  <%= render_plugin_partial(:after_article_whole, :locals => {:article => resource}) %>
6
6
  </div>
7
- <%= link_to 'Back', polymorphic_path(mapping.plural) %>
8
7
  <% if governor_authorized?(:edit, resource) %>
9
- | <%= link_to 'Edit', polymorphic_path(resource, :action => :edit) %>
8
+ <%= link_to 'Edit', polymorphic_path(resource, :action => :edit) %>
10
9
  <% end %>
11
10
  <% if governor_authorized?(:destroy, resource) %>
12
- | <%= link_to 'Delete', resource, :method => :delete %>
11
+ <%= link_to 'Delete', resource, :method => :delete %>
13
12
  <% end %>
data/governor.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{governor}
8
- s.version = "0.2.2"
8
+ s.version = "0.2.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Liam Morley"]
12
- s.date = %q{2011-04-11}
12
+ s.date = %q{2011-04-12}
13
13
  s.description = %q{Because Blogojevich would be too tough to remember. It's a pluggable blogging system for Rails 3.}
14
14
  s.email = %q{liam@carpeliam.com}
15
15
  s.extra_rdoc_files = [
@@ -4,6 +4,8 @@ module Governor
4
4
  module Article
5
5
  def self.included(base) #:nodoc:
6
6
  base.belongs_to :author, :polymorphic => true
7
+ base.validates_presence_of :author, :title, :post
8
+
7
9
  Governor::PluginManager.plugins.each do |plugin|
8
10
  plugin.include_in_model(base)
9
11
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: governor
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 2
10
- version: 0.2.2
9
+ - 3
10
+ version: 0.2.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Liam Morley
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-04-11 00:00:00 -04:00
18
+ date: 2011-04-12 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency