Add autolink to project/group description render

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
Dmitriy Zaporozhets 2014-06-12 22:58:59 +03:00
parent 92ccc687b0
commit afe47e26f5
No known key found for this signature in database
GPG key ID: 627C5F589F467F17
4 changed files with 10 additions and 3 deletions

View file

@ -13,6 +13,9 @@ gem "rails", "~> 4.1.0"
gem "protected_attributes"
gem 'rails-observers'
# Make links from text
gem 'rails_autolink', '~> 1.1'
# Default values for AR models
gem "default_value_for", "~> 3.0.0"

View file

@ -367,6 +367,8 @@ GEM
sprockets-rails (~> 2.0)
rails-observers (0.1.2)
activemodel (~> 4.0)
rails_autolink (1.1.6)
rails (> 3.1)
rails_best_practices (1.14.4)
activesupport
awesome_print
@ -641,6 +643,7 @@ DEPENDENCIES
rack-mini-profiler
rails (~> 4.1.0)
rails-observers
rails_autolink (~> 1.1)
rails_best_practices
raphael-rails (~> 2.1.2)
rb-fsevent

View file

@ -5,7 +5,7 @@
= link_to dashboard_path, class: 'btn btn-tiny' do
&larr; To dashboard
&nbsp;
%span.cgray
%span.cgray
Currently you are only seeing events from the
= @group.name
group
@ -23,7 +23,8 @@
%h3.page-title
= @group.name
- if @group.description.present?
%p= @group.description
%p
= auto_link @group.description, link: :urls
= render "projects", projects: @projects
- if current_user
.prepend-top-20

View file

@ -17,7 +17,7 @@
.col-md-8
.project-home-desc
- if @project.description.present?
= @project.description
= auto_link @project.description, link: :urls
- if can?(current_user, :admin_project, @project)
&ndash;
%strong= link_to 'Edit', edit_project_path