Skip to content

Commit

Permalink
Fixing more DM 0.9 fun issues with include order
Browse files Browse the repository at this point in the history
  • Loading branch information
mleung committed Jun 11, 2008
1 parent 18ebc87 commit c61c20c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion app/models/activity.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
class Activity
include DataMapper::Validate
include DataMapper::Resource

property :id, Integer, :key => true, :serial => true
property :message, String, :nullable => false, :length => 255
property :message, String, :length => 255
property :created_at, DateTime

validates_present :message, :key => "uniq_msg"

end
2 changes: 1 addition & 1 deletion app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
nil
end
class User
include DataMapper::Resource
include DataMapper::Validate
include AuthenticatedSystem::Model
include DataMapper::Resource

attr_accessor :password, :password_confirmation

Expand Down
2 changes: 1 addition & 1 deletion app/views/articles/_article.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<div class="vcard">
Posted by <span class="fn"><%= article.user.name %></span>
</div>
<abbr class="published" title=""><%= article.published_at.strftime("on %b %d, %y") %></abbr>
<abbr class="published" title=""><%= article.published_at.strftime("on %b %d, %y") unless article.published_at.nil? %></abbr>
<br class="clear" />
<div class="entry-content">
<%= render_article(article) %>
Expand Down

0 comments on commit c61c20c

Please sign in to comment.