Skip to content

Commit

Permalink
Add method for retrieving any option from render_options or nil inste…
Browse files Browse the repository at this point in the history
…ad (#1213)
  • Loading branch information
ashgaliyev authored and justin808 committed May 6, 2019
1 parent 3d772ea commit 5a978a8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ Changes since last non-beta release.
*Please add entries here for your pull requests that are not yet released.*
### [11.3.0] - 2019-04-20
#### Added
- Added method for retrieving any option from `render_options` [PR 1213](https://github.com/shakacode/react_on_rails/pull/1213)
by [ashgaliyev](https://github.com/ashgaliyev).

- html_options can now has option for 'tag' to add dynamically html element. like this: `html_options: { tag: "span" }`.
[PR 1208](https://github.com/shakacode/react_on_rails/pull/1208) by [tahsin352](https://github.com/tahsin352).

Expand Down
4 changes: 4 additions & 0 deletions lib/react_on_rails/react_component/render_options.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ def to_s
"{ react_component_name = #{react_component_name}, options = #{options}, request_digest = #{request_digest}"
end

def internal_option(key)
options[key]
end

private

attr_reader :options
Expand Down

0 comments on commit 5a978a8

Please sign in to comment.