redde 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3b23f3112788138ab81a62d419e82be5a3bcd6faa088c86f8f3bcb2daab67a12
4
- data.tar.gz: c571516bc8cba6781f3c0e1e3b5b53434a6c4c0dfa74b27e95c06e00b85ec624
3
+ metadata.gz: dae7c80cda1459f63ab09def8247a69dd816a8cc5a72e9a55bd3aadd5c695873
4
+ data.tar.gz: 4c24efc21c5e212581e0495e2f71da2b7049b5f3743ed4a0b3bea215f240c97a
5
5
  SHA512:
6
- metadata.gz: 7a1e2617644e1d6c01a63b2e18882b04be946459e3df64976d09a92a510df826e4354e899afb0640f1d543857b723ffab73c95544642067f26afe43d7264dd31
7
- data.tar.gz: f0b251d2f1929fec19dda9998c0b47e8c895433a79e525b5f53de98368f2aa545ee00f734c127b81c607b8e4477642d6e4e4341a7ba0ec32bdd408776ad070bd
6
+ metadata.gz: 0c833d1a40708d0126aaf54edbc5f4b0e5a22fc5e482ff80c6413c1d4f34048ce735ef75adf766b27377a651edf98113f53e669907db92cc119a07ce49a522c7
7
+ data.tar.gz: 12d8dc114e13b851e5ff9a8a0706d1201930abdf28abfea1d840bfb3014cd6a6335241c2c20f8b649301be8b643d363ec01789776454c2a45e214820cd889902
@@ -2,11 +2,11 @@ class Redde::Photo < ActiveRecord::Base
2
2
  mount_uploader :src, PhotoUploader
3
3
  self.table_name = 'redde_photos'
4
4
 
5
- if Rails.version.split('.').join.to_i > 510
6
- belongs_to :imageable, polymorphic: true, optional: true
7
- else
8
- belongs_to :imageable, polymorphic: true
9
- end
5
+ opts = { polymorphic: true }
6
+ opts.merge!(optional: true) if Rails.version.split('.').join.to_i > 510
7
+
8
+ belongs_to :imageable, opts
9
+
10
10
  default_scope { order(:position) }
11
11
  before_save :set_token, unless: :persisted_link?
12
12
 
data/lib/redde/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Redde
2
- VERSION = '0.4.1'.freeze
2
+ VERSION = '0.4.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redde
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oleg Bovykin