beef-has_assets 0.6.6 → 0.6.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.6
1
+ 0.6.7
@@ -41,7 +41,7 @@ class Admin::AssetsController < Admin::BaseController
41
41
  end
42
42
 
43
43
  def category
44
- @assets = Asset.all(:conditions => ["category = ?",params[:category]])
44
+ @assets = Asset.all(:conditions => ["category = ?",params[:category].rstrip])
45
45
 
46
46
  respond_to do |format|
47
47
  format.html { render :layout => false}
@@ -1,4 +1,6 @@
1
1
  class Admin::FlickrsController < Admin::BaseController
2
+ helper AssetsHelper
3
+
2
4
  def create
3
5
  flickr = Flickr.new("#{RAILS_ROOT}/config/flickr.yml")
4
6
  redirect_to flickr.auth.url(:write)
@@ -51,4 +51,8 @@ module Admin::AssetsHelper
51
51
  return unless defined?(Flickr) and File.exists?("#{RAILS_ROOT}/config/flickr.yml") and !Settings.flickr_user_id.blank?
52
52
  render :partial => 'admin/flickrs/selector'
53
53
  end
54
+
55
+ def flickr_default_size
56
+ defined?(Beef::Has::Assets::FLICKR_DEFAULT_SIZE) ? Beef::Has::Assets::FLICKR_DEFAULT_SIZE : :medium
57
+ end
54
58
  end
@@ -1 +1 @@
1
- <%= link_to "#{image_tag photo.url(:square), :alt => photo.description}", "#{photo.url(:large)}", :title => "#{photo.title}", :onclick => "addLinkedImage('#{photo.url(:medium)}',this.title); return false;" %>
1
+ <%= link_to "#{image_tag photo.url(:square), :alt => photo.description}", "#{photo.url(:large)}", :title => "#{photo.title}", :onclick => "addLinkedImage('#{photo.url(flickr_default_size)}',this.title); return false;" %>
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{beef-has_assets}
8
- s.version = "0.6.6"
8
+ s.version = "0.6.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Steve England"]
12
- s.date = %q{2009-12-01}
12
+ s.date = %q{2010-01-14}
13
13
  s.email = %q{steve@wearebeef.co.uk}
14
14
  s.extra_rdoc_files = [
15
15
  "LICENSE",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beef-has_assets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.6
4
+ version: 0.6.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve England
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-01 00:00:00 +00:00
12
+ date: 2010-01-14 00:00:00 +00:00
13
13
  default_executable:
14
14
  dependencies: []
15
15