Skip to content

Commit c61c20c

Browse files
committed
Fixing more DM 0.9 fun issues with include order
1 parent 18ebc87 commit c61c20c

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

app/models/activity.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
class Activity
2+
include DataMapper::Validate
23
include DataMapper::Resource
34

45
property :id, Integer, :key => true, :serial => true
5-
property :message, String, :nullable => false, :length => 255
6+
property :message, String, :length => 255
67
property :created_at, DateTime
8+
9+
validates_present :message, :key => "uniq_msg"
710

811
end

app/models/user.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
nil
66
end
77
class User
8-
include DataMapper::Resource
98
include DataMapper::Validate
109
include AuthenticatedSystem::Model
10+
include DataMapper::Resource
1111

1212
attr_accessor :password, :password_confirmation
1313

app/views/articles/_article.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<div class="vcard">
77
Posted by <span class="fn"><%= article.user.name %></span>
88
</div>
9-
<abbr class="published" title=""><%= article.published_at.strftime("on %b %d, %y") %></abbr>
9+
<abbr class="published" title=""><%= article.published_at.strftime("on %b %d, %y") unless article.published_at.nil? %></abbr>
1010
<br class="clear" />
1111
<div class="entry-content">
1212
<%= render_article(article) %>

0 commit comments

Comments
 (0)