presenter_object 0.1.2 → 0.1.3

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: a3218a53901e6d3ab11f8556079fdcfb04395bc3
4
- data.tar.gz: 71fc026d822a92de47e363df0750e55bc896fdb4
3
+ metadata.gz: 1a9942a2e26e8e458e80037f6257954a447d7fc3
4
+ data.tar.gz: a241516a1cb985f18092dd19536ab114ba4158f8
5
5
  SHA512:
6
- metadata.gz: 24dceaef970d75cc0fdf931bf1698c4c167e7e4e630f0f8a35ebd8761f178b55f9d4fcc136cf4ec00c695f7776b7a353c3d2b816e6be9e68522bd29e927704ac
7
- data.tar.gz: e83fbb617171ca5750b5ff34031391407ccda3ebebc09319bb5360e85db7813c564a0d53fd38478f815647bfc283574df5630c8a60136cec5da41f97aa05adcd
6
+ metadata.gz: e309a2c3064a171f4581771cdd79a7c051179ec0137c23b3fa79f27e619cfafb8c9f4a0ba0e5dd59ce76dc6e0f716b8bc799520d05eb4d85ef23e73528a51c70
7
+ data.tar.gz: dfbb9d8c37f05c4092ab7e31ea7731e36f95038aeec188a0c8d89db50971bc67ebe779105d46c8df1d59661447dfdabf1d20a8daa333d399f23262483f4e380a
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # PresenterObject
2
2
 
3
- This is a simple presenter base class you can use to create model specific presenters.
3
+ This is a simple presenter base class you can use to create model specific presenters.
4
4
 
5
5
  ## Installation
6
6
 
@@ -32,10 +32,13 @@ class PresenterObject::Base
32
32
  end
33
33
  end
34
34
 
35
- attr_reader :object, :class, :view_context
35
+ attr_reader :object, :class, :to_param, :view_context
36
36
 
37
37
  def initialize(object, view_context)
38
- @object, @class, @view_context = object, object.class, view_context
38
+ @object = object
39
+ @class = object.class # impersonate object's class
40
+ @to_param = object.id # let link helpers know the object's id
41
+ @view_context = view_context
39
42
  end
40
43
 
41
44
  def method_missing(name, *args, &block)
@@ -1,3 +1,3 @@
1
1
  module PresenterObject
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: presenter_object
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Diego Salazar
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-07-14 00:00:00.000000000 Z
11
+ date: 2016-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler