Skip to content

Commit

Permalink
Merge branch 'release/0.2.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
exsemt committed Dec 16, 2013
2 parents b40307c + b448433 commit f6efd26
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -15,3 +15,4 @@ spec/reports
test/tmp
test/version_tmp
tmp
.idea/*
6 changes: 5 additions & 1 deletion README.md
Expand Up @@ -20,7 +20,7 @@ Or install it yourself as:

## Usage

example in HAML
example in HAML (or more here: http://table-go-example.exsemt.de/)

= table_go_for @orders, Order, :title => 'one Table',
:table_html => { :id => :the_table },
Expand Down Expand Up @@ -78,6 +78,10 @@ example in HAML

## Changelog

#### 0.2.6

- bugfixing

#### 0.2.5

- fixed generate csv bug
Expand Down
10 changes: 5 additions & 5 deletions lib/table_go/renderers/renderer_base.rb
Expand Up @@ -91,20 +91,20 @@ def capture_view
template.is_haml? ? capture_haml { yield } : template.capture { yield }
end

delegate :with_haml_buffer, :haml_buffer, :to => :template
#delegate :with_haml_buffer, :to => :template

# stripped down ripoff from Haml's capture_haml, needed for speed
def capture_haml(*args, &block)
# buffer = eval('if defined? _hamlout then _hamlout else nil end', block.binding) || haml_buffer
# buffer = haml_buffer
# with_haml_buffer(buffer) do
position = haml_buffer.buffer.length
position = template.send(:haml_buffer).buffer.length

haml_buffer.capture_position = position
template.send(:haml_buffer).capture_position = position
block.call(*args)

# captured = haml_buffer.buffer.slice!(0..-1)
captured = haml_buffer.buffer.slice!(position..-1)
captured = template.send(:haml_buffer).buffer.slice!(position..-1)
# return captured if haml_buffer.options[:ugly]

# debugger
Expand All @@ -124,7 +124,7 @@ def capture_haml(*args, &block)
# end.join
# end
ensure
haml_buffer.capture_position = nil
template.send(:haml_buffer).capture_position = nil
end


Expand Down
2 changes: 1 addition & 1 deletion lib/table_go/version.rb
@@ -1,3 +1,3 @@
module TableGo
VERSION = '0.2.5'
VERSION = '0.2.6'
end

0 comments on commit f6efd26

Please sign in to comment.