Skip to content

Commit

Permalink
Change Rails version to 4.1
Browse files Browse the repository at this point in the history
Fix partial rendering for Rails 4.1
Bump version
  • Loading branch information
mariochavez committed Jun 10, 2014
1 parent 91fe608 commit e3e1b48
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion api_taster.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Gem::Specification.new do |s|
s.files = `git ls-files`.split($\)
s.test_files = Dir["spec/**/*"]

s.add_dependency 'rails', '~> 4.0.0'
s.add_dependency 'rails', '~> 4.1.0'
s.add_dependency 'jquery-rails'
s.add_dependency 'sass-rails'
s.add_dependency 'bootstrap-sass', '~> 2.1'
Expand Down
5 changes: 3 additions & 2 deletions lib/api_taster/form_builder.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module ApiTaster
class FormBuilder < AbstractController::Base
include AbstractController::Rendering
include ActionView::Layouts
include ActionView::Context
include ActionView::Helpers::CaptureHelper

Expand Down Expand Up @@ -48,7 +49,7 @@ def add_to_buffer(params, parent_labels = [])

def add_element_to_buffer(parent_labels, label, value)
@_buffer += render(
:partial => 'api_taster/routes/param_form_element',
:template => 'api_taster/routes/_param_form_element',
:locals => {
:label => "#{print_labels(parent_labels)}#{label}",
:label_text => label,
Expand All @@ -59,7 +60,7 @@ def add_element_to_buffer(parent_labels, label, value)

def add_legend_to_buffer(parent_labels, label)
@_buffer += render(
:partial => 'api_taster/routes/param_form_legend',
:template => 'api_taster/routes/_param_form_legend',
:locals => { :label => print_labels(parent_labels.clone << label) }
)
end
Expand Down
2 changes: 1 addition & 1 deletion lib/api_taster/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module ApiTaster
VERSION = "0.7.0"
VERSION = "0.8.0"
end

0 comments on commit e3e1b48

Please sign in to comment.