You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This one solves many problems at once:
- Fixes#140. For this one I changed specs a bit. It's breaking but I
think it's worth it.
- Fixes#142 differently because now `respond_to?(name, true)` stuff is
incapsulated in `Delegator::PlainObject`.
- Old `delegate_attribute` catched `NoMethodError` and re-raised it
with custom message. It's incorrect because `NoMethodError` can occur
deep inside in method call — this exception simply doesn't mean that
attribute doesn't exist.
- Solves the problem that object is checked to `is_a?(Hash)` and
`respond_to?(:fetch, true)` multiple times.
- Extracts delegating logic to separate delegator classes.
- Removes constructing of `valid_exposures` at all — there's no need in
this method now.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,10 @@
7
7
*[#134](https://github.com/intridea/grape-entity/pull/134): Subclasses no longer affected in all cases by `unexpose` in parent - [@etehtsea](https://github.com/etehtsea).
*[#136](https://github.com/intridea/grape-entity/pull/136): Allow for strings in `only` and `except` options - [@bswinnerton](https://github.com/bswinnerton).
10
+
*[#147](https://github.com/intridea/grape-entity/pull/147): Expose `safe` attributes as `nil` if they cannot be evaluated: [#140](https://github.com/intridea/grape-entity/issues/140).
11
+
*[#147](https://github.com/intridea/grape-entity/pull/147): Fix: private method values were not exposed with `safe` option: [#142](https://github.com/intridea/grape-entity/pull/142).
12
+
*[#147](https://github.com/intridea/grape-entity/pull/147): Remove catching of `NoMethodError` because it can occur deep inside in a method call so this exception does not mean that attribute not exist.
13
+
*[#147](https://github.com/intridea/grape-entity/pull/147): `valid_exposures` is removed.
0 commit comments