poodle-rb 0.0.3 → 0.0.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e4639f86da6f008126a69fa0ccbb2abef87c9c9e
4
- data.tar.gz: f968ce10264e5061d67c34ddb8f65b7582308d9c
3
+ metadata.gz: ad966d80727051aa1ec66cda0512b8ff140a4885
4
+ data.tar.gz: e689a93766d9f7035eaf8b416a48427a683e1836
5
5
  SHA512:
6
- metadata.gz: f1ac95425ece844e1a44acdd32abce8afcbab171a8fda9ec0ced780ea2db9c56e6aba080de27b2fda4365b5c396f93a3a876d5f4d4ffdc316412051201581d32
7
- data.tar.gz: 7da690ff6b6aac9684c46c018cfaab55efbb1a9b923b063c910a6c60c293c309044b765446af953427266be9c91febefc7498cb9cd7bda7e2d56c9a6f3dc7991
6
+ metadata.gz: 5d0a5fef71c59114fc9696b871916941a34902e0c685c560e296be0ea3cdb969cdbaace2377c3f14fc38a10f316e7ba8d45f04af8634cdadfac201854c49075b
7
+ data.tar.gz: eb67ab043e93d61d230b01cfb886c5f21d041ddf5b288e3dd5c69b918de5c8a5a09f27513636f02abf417e737883ab13fb3be00854bb41339ed427cfc283a1ad
@@ -41,30 +41,5 @@ module Poodle
41
41
  img_url = image_url(object, eval_url, ph)
42
42
  return image_tag img_url, class: hsh[:class], style: "width:#{hsh[:width]};height:#{hsh[:height]};#{hsh[:style]}"
43
43
  end
44
-
45
- ## Returns new photo url or edit existing photo url based on
46
- # object is associated with photo or not
47
- # == Examples
48
- # >>> upload_image_link(@user, admin_user_path(@user), :profile_picture)
49
- # => "/admin/images/new" OR
50
- # => "/admin/images/1/edit"
51
- def upload_image_link(object, redirect_url, assoc_name=:photo)
52
- photo_object = nil
53
- photo_object = object.send(assoc_name) if object.respond_to?(assoc_name)
54
-
55
- if photo_object.present? && photo_object.persisted?
56
- edit_admin_image_path(photo_object,
57
- :redirect_url => redirect_url,
58
- :imageable_id => object.id,
59
- :imageable_type => object.class.to_s,
60
- :image_type => photo_object.class.name)
61
- else
62
- photo_object = object.send("build_#{assoc_name}")
63
- new_admin_image_path(:redirect_url => redirect_url,
64
- :imageable_id => object.id,
65
- :imageable_type => object.class.to_s,
66
- :image_type => photo_object.class.name)
67
- end
68
- end
69
44
  end
70
45
  end
@@ -1,3 +1,3 @@
1
1
  module Poodle
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: poodle-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Krishnaprasad Varma