sga_paperclippolymorph 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.3
1
+ 0.2.4
@@ -84,7 +84,7 @@ module LocusFocus
84
84
  end
85
85
 
86
86
  def asset_path create_dir=false
87
- assets_dir = File.join RAILS_ROOT, 'public', 'system', 'assets'
87
+ assets_dir = File.join RAILS_ROOT, 'public', 'system', 'assets', (wuid_host ? wuid_host.wid : self.wid)[0].chr
88
88
  (FileUtils.mkdir_p assets_dir unless File.exists?(assets_dir)) if create_dir
89
89
  sgf_file = "#{wuid_host ? self.send(wuid_host).wid : self.wid}.sgf"
90
90
  File.join assets_dir, sgf_file
data/lib/sga/asset.rb CHANGED
@@ -4,6 +4,7 @@ require 'digest/md5'
4
4
  include Paperclip
5
5
 
6
6
  class Asset < ActiveRecord::Base
7
+
7
8
  has_many :attachings, :dependent => :destroy
8
9
 
9
10
  has_attached_file :data,
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{sga_paperclippolymorph}
8
- s.version = "0.2.3"
8
+ s.version = "0.2.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["tim.teng"]
12
- s.date = %q{2010-09-23}
12
+ s.date = %q{2010-11-30}
13
13
  s.description = %q{gem version of paperclippolymorph for sga company}
14
14
  s.email = %q{tim.rubist@gmail.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 3
9
- version: 0.2.3
8
+ - 4
9
+ version: 0.2.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - tim.teng
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-09-23 00:00:00 +08:00
17
+ date: 2010-11-30 00:00:00 +08:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency