q_auth_ruby_client 0.0.7 → 0.0.8
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0de4699130ba2772e15813492b4f11cc8efc1c09
|
4
|
+
data.tar.gz: ba0b02f32817ae89b7bc2c07f3f4efcaf35d711d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca5474ddc54623798e6f47eb69c78482dc2687de7c0e0c305fbb0a4671109d959d743f9a415551b8afac3c4916b1ef00606df663e6a3918a6422bd0cd16759f0
|
7
|
+
data.tar.gz: be95f7f0e006cc4ddc48a9b442274380bbe98c2c573fe2459eb1cfdcadb25e82032f68906e022f8290ac22df5e5e292896e117e77505fd8b8a64900692f3a06f
|
@@ -1,28 +1,4 @@
|
|
1
1
|
module QAuthRubyClient
|
2
2
|
module ApplicationHelper
|
3
|
-
## Returns new photo url or edit existing photo url based on
|
4
|
-
# object is associated with photo or not
|
5
|
-
# == Examples
|
6
|
-
# >>> upload_image_link(@user, admin_user_path(@user), :profile_picture)
|
7
|
-
# => "/admin/images/new" OR
|
8
|
-
# => "/admin/images/1/edit"
|
9
|
-
def upload_image_link(object, redirect_url, assoc_name=:photo)
|
10
|
-
photo_object = nil
|
11
|
-
photo_object = object.send(assoc_name) if object.respond_to?(assoc_name)
|
12
|
-
|
13
|
-
if photo_object.present? && photo_object.persisted?
|
14
|
-
main_app.edit_admin_image_path(photo_object,
|
15
|
-
:redirect_url => redirect_url,
|
16
|
-
:imageable_id => object.id,
|
17
|
-
:imageable_type => object.class.to_s,
|
18
|
-
:image_type => photo_object.class.name)
|
19
|
-
else
|
20
|
-
photo_object = object.send("build_#{assoc_name}")
|
21
|
-
main_app.new_admin_image_path(:redirect_url => redirect_url,
|
22
|
-
:imageable_id => object.id,
|
23
|
-
:imageable_type => object.class.to_s,
|
24
|
-
:image_type => photo_object.class.name)
|
25
|
-
end
|
26
|
-
end
|
27
3
|
end
|
28
4
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: q_auth_ruby_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Krishnaprasad Varma
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -36,20 +36,20 @@ dependencies:
|
|
36
36
|
requirements:
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: 0.1.
|
39
|
+
version: 0.1.4
|
40
40
|
- - ">="
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 0.0
|
42
|
+
version: 0.1.0
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
47
|
- - "~>"
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: 0.1.
|
49
|
+
version: 0.1.4
|
50
50
|
- - ">="
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: 0.0
|
52
|
+
version: 0.1.0
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: typhoeus
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|