Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix undefined method content_tag #350

Merged
merged 1 commit into from
Apr 21, 2015
Merged

fix undefined method content_tag #350

merged 1 commit into from
Apr 21, 2015

Conversation

emma-borhanian
Copy link
Contributor

Started getting the following exception after bumping from 0.3.3 to 0.3.4:

ActionView::Template::Error:
 undefined method `content_tag' for #<Apipie::ApipiesController:0x007ffdb1a5e608>
# /Users/emma/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/apipie-rails-0.3.4/app/helpers/apipie_helper.rb:4:in `heading'
# /Users/emma/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/actionpack-4.2.1/lib/abstract_controller/helpers.rb:67:in `heading'
# /Users/emma/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/apipie-rails-0.3.4/app/views/apipie/apipies/_method_detail.erb:27:in `___sers_emma__rbenv_versions_______lib_ruby_gems_______gems_apipie_rails_______app_views_apipie_apipies__method_detail_erb__4191062763070027136_70363792007840'
# /Users/emma/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/actionview-4.2.1/lib/action_view/template.rb:145:in `block in render'

@ghost
Copy link

ghost commented Apr 8, 2015

👍 for this fix, I have same issue on rails 3.2.11

@saneshark
Copy link
Contributor

I think this issue probably started manifesting itself for you guys after my PR #348 which addressed #251 was merged. The helper method was not being properly included as part of ActionController::Base but now I'm wondering how it is that that this worked for RailsApi prior to my patch?

It might also be worth testing that an existing helper having the same name heading within a projects ApplicationHelper doesn't override this method and have unintended consequences. To my knowledge these would all be in the same helper method namespace. Ideally the method would just be available in the context of this specific controller as a method and not pollute the global helper namespace.

@lumir
Copy link

lumir commented Apr 15, 2015

I have the same issue, I can't use any of my def_param_group in my controller

@iNecas
Copy link
Member

iNecas commented Apr 21, 2015

Thanks

iNecas added a commit that referenced this pull request Apr 21, 2015
@iNecas iNecas merged commit d5c26fb into Apipie:master Apr 21, 2015
@emma-borhanian emma-borhanian deleted the fix-content_tag-crash branch April 21, 2015 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants