Commit 3abd977822247581465ff6d6df52d2c08e8da508
1 parent
020e1a8e
Exists in
master
and in
4 other branches
fixed error with ascii error for dashboard
Showing
6 changed files
with
24 additions
and
6 deletions
Show diff stats
app/models/issue.rb
| ... | ... | @@ -10,6 +10,11 @@ class Issue < ActiveRecord::Base |
| 10 | 10 | validates_presence_of :assignee_id |
| 11 | 11 | validates_presence_of :author_id |
| 12 | 12 | |
| 13 | + delegate :name, | |
| 14 | + :email, | |
| 15 | + :to => :author, | |
| 16 | + :prefix => true | |
| 17 | + | |
| 13 | 18 | validates :title, |
| 14 | 19 | :presence => true, |
| 15 | 20 | :length => { :within => 0..255 } | ... | ... |
app/models/note.rb
app/views/commits/_commits.html.haml
| ... | ... | @@ -11,15 +11,15 @@ |
| 11 | 11 | %i |
| 12 | 12 | %data.commit-browse{ :onclick => "location.href='#{tree_project_path(@project, :commit_id => commit.id)}';return false;"} |
| 13 | 13 | Browse Code |
| 14 | - - if commit.author.email | |
| 15 | - = image_tag gravatar_icon(commit.author.email), :class => "left", :width => 40, :style => "padding-right:5px;" | |
| 14 | + - if commit.author_email | |
| 15 | + = image_tag gravatar_icon(commit.author_email), :class => "left", :width => 40, :style => "padding-right:5px;" | |
| 16 | 16 | - else |
| 17 | 17 | = image_tag "no_avatar.png", :class => "left", :width => 40, :style => "padding-right:5px;" |
| 18 | 18 | %span.commit-title |
| 19 | 19 | %strong |
| 20 | 20 | = truncate(commit.safe_message, :length => 60) |
| 21 | 21 | %span.commit-author |
| 22 | - %strong= commit.author | |
| 22 | + %strong= commit.author_name | |
| 23 | 23 | = time_ago_in_words(commit.committed_date) |
| 24 | 24 | ago |
| 25 | 25 | = more_commits_link if @commits.size > 99 | ... | ... |
app/views/commits/show.html.haml
app/views/dashboard/index.html.haml
| ... | ... | @@ -25,11 +25,11 @@ |
| 25 | 25 | .data |
| 26 | 26 | - project.updates.each do |update| |
| 27 | 27 | %a.project-update{:href => dashboard_feed_path(project, update)} |
| 28 | - = image_tag gravatar_icon(update.author.email), :class => "left", :width => 40 | |
| 28 | + = image_tag gravatar_icon(update.author_email), :class => "left", :width => 40 | |
| 29 | 29 | %span.update-title |
| 30 | 30 | = dashboard_feed_title(update) |
| 31 | 31 | %span.update-author |
| 32 | - %strong= update.author.name | |
| 32 | + %strong= update.author_name | |
| 33 | 33 | authored |
| 34 | 34 | = time_ago_in_words(update.created_at) |
| 35 | 35 | ago | ... | ... |
lib/commit_ext.rb