adminpanel 2.5.4 → 2.5.5

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: d9ebfa9303054c3167f2244f4343c26290c717c4
4
- data.tar.gz: c9c795f7c6c8123c88ed3629bba3194ccdaa1c9d
3
+ metadata.gz: 76f203b13f966b54227ff89c817e91518cb6516a
4
+ data.tar.gz: aa51158837bbb402b9ac73db74e6aa9a6b816aa9
5
5
  SHA512:
6
- metadata.gz: 2acee553facf3aeb288c3ac7cb47b7642f31e0cb64de12ac7f2ee341b65eff32cecfdeafd36e536d987c1c8268a602408aebd126dfe83fa36f7ac06c4df7e7c8
7
- data.tar.gz: 7d2e33fd92205c7df96067e0fa663c8f5df8eb2f44106b11cc58078a86726137f142d075927b605cece97616411c6bada682ae87c2d896962e85ed738689e2ea
6
+ metadata.gz: 0b64dff88eda8e91884f069fa8f91f0d9e860726f2207c53b1f60aa49a09f66e72299c1e941be69af36829c1362ca6f8277eb6068549d37c8e5a1a836174c92d
7
+ data.tar.gz: c2e5c520beda534386129a1b3830824731e81d2cac590b763764e6c8ded3574a3ed7d07cc2c67e4891538cf9cc567fe88cd8743d360dd897d917678fb7004066
@@ -38,12 +38,14 @@ module Adminpanel
38
38
  authorize! :publish, @resource_instance
39
39
 
40
40
  page_graph = Koala::Facebook::API.new(Auth.find_by_key('facebook').value)
41
+ options = {
42
+ link: @resource_instance.share_link,
43
+ name: @resource_instance.name
44
+ }
45
+ options.merge!({ picture: @resource_instance.share_picture }) if @resource_instance.share_picture
41
46
  page_graph.put_wall_post(
42
47
  params[model_name][:fb_message],
43
- {
44
- link: @resource_instance.share_link,
45
- name: @resource_instance.name
46
- }
48
+ options
47
49
  )
48
50
  flash[:success] = I18n.t('fb.posted', user: page_graph.get_object('me')['name'])
49
51
  redirect_to @resource_instance
@@ -9,6 +9,12 @@ module Adminpanel
9
9
  'http://www.google.com'
10
10
  end
11
11
 
12
+ # if return any other thing than nil, it'll send it as the picture_thumb
13
+ # whenever it's posted.
14
+ def share_picture
15
+ nil
16
+ end
17
+
12
18
  # static(class) methods
13
19
  module ClassMethods
14
20
  def fb_share?
@@ -1,3 +1,3 @@
1
1
  module Adminpanel
2
- VERSION = '2.5.4'
2
+ VERSION = '2.5.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adminpanel
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.4
4
+ version: 2.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jose Ramon Camacho
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-04-28 00:00:00.000000000 Z
13
+ date: 2015-05-01 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails