From ed72967007bcf041ccd5ddf6f699ee6410567b97 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Mon, 27 Oct 2014 11:16:10 -0400 Subject: [PATCH] Add glyphicon --- app/helpers/application_helper.rb | 4 ++++ app/views/users/index.html.erb | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 4b0e707..4ab87a2 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -3,6 +3,10 @@ module ApplicationHelper bootstrap_classes[flash_type] || flash_type.to_s end + def glyph(icon) + content_tag(:i, class: "glyphicon glyphicon-#{icon}") {} + end + private def bootstrap_classes diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index 1eb3b1b..ed0975b 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb @@ -16,7 +16,8 @@ <%= user.created_at %> <%= user.updated_at %> - <%= link_to '+', friendships_path(:friend_id => user), :method => :post %> + <%= link_to glyph('plus'), friendships_path(:friend_id => user), + :method => :post %> <% end %>