Skip to content

Commit

Permalink
[ci skip] Prepare for v0.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jodosha committed Jun 16, 2015
1 parent c8d31fd commit b170f79
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Lotus::View
View layer for Lotus

## v0.4.2 - 2015-06-23
### Fixed
- [Tom Kadwill] Ensure views to use methods defined by the associated layout.

## v0.4.1 - 2015-05-22
### Added
- [Luca Guidi] Introduced `#content` to render optional contents in a different context (eg. a view sets a page specific javascript in the application template footer).
Expand Down
2 changes: 2 additions & 0 deletions lib/lotus/view/rendering/layout_scope.rb
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,8 @@ def _options(options)
end
end

# @since 0.4.2
# @api private
def layout
@layout || @layout.class.layout.new(@scope, "")
end
Expand Down
3 changes: 3 additions & 0 deletions lib/lotus/view/rendering/scope.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ def method_missing(m, *args, &block)
end

private

# @since 0.4.2
# @api private
def layout
if @view.class.respond_to?(:layout)
@view.class.layout.new(self, "")
Expand Down
2 changes: 1 addition & 1 deletion lib/lotus/view/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ module View
# Defines the version
#
# @since 0.1.0
VERSION = '0.4.1'.freeze
VERSION = '0.4.2'.freeze
end
end
2 changes: 1 addition & 1 deletion test/version_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

describe Lotus::View::VERSION do
it 'returns current version' do
Lotus::View::VERSION.must_equal '0.4.1'
Lotus::View::VERSION.must_equal '0.4.2'
end
end

0 comments on commit b170f79

Please sign in to comment.