Skip to content

Commit

Permalink
Use cloudinary settings for cloud name instead of hardcoded value
Browse files Browse the repository at this point in the history
Signed-off-by: Scott Miller <scott.miller.utah@gmail.com>
  • Loading branch information
scott committed Sep 23, 2015
1 parent 3901801 commit b230e7b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/helpers/users_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def user_avatar(user, size=40)
def avatar_image(user, size=40)

if user.avatar.nil? == false
image_tag("http://res.cloudinary.com/helpy-io/image/upload/c_thumb,w_#{size},h_#{size}/#{user.avatar.path}", width: "#{size}px", class: 'img-circle')
image_tag("http://res.cloudinary.com/#{Cloudinary.config.cloud_name}/image/upload/c_thumb,w_#{size},h_#{size}/#{user.avatar.path}", width: "#{size}px", class: 'img-circle')
elsif !user.thumbnail.nil?
image_tag(user.thumbnail, width: "#{size}px", class: 'img-circle')
else
Expand Down
2 changes: 1 addition & 1 deletion app/views/posts/_post.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<div id="post-images">
<ul class="list-inline">
<% post.screenshots.each do |screenshot| %>
<li><%= link_to cl_image_tag(screenshot.path, { size: '125x125', crop: :fit }), "http://res.cloudinary.com/helpy-io/image/upload/#{screenshot.path}", class: 'screenshot-link' %></li>
<li><%= link_to cl_image_tag(screenshot.path, { size: '125x125', crop: :fit }), "http://res.cloudinary.com/#{Cloudinary.config.cloud_name}/image/upload/#{screenshot.path}", class: 'screenshot-link' %></li>
<% end %>
</ul>
</div>
Expand Down

0 comments on commit b230e7b

Please sign in to comment.