ronalchn / ajax_pagination

Handles AJAX site navigation, loads content into ajax_section containers using AJAX links.
Other
38 stars 13 forks source link

Cannot mute warnings #8

Open abrambailey opened 10 years ago

abrambailey commented 10 years ago

I just updated to Rails 4 and I cannot seem to mute the warnings:

config/initializers/ajax_pagination.rb AjaxPagination.config do |config| config.warnings = false end

Here is my controller code: respond_to do |format| format.html ajax_respond :section_id => "devices", :render => "_devices" end

Here is my view: <%= ajax_section :id => "devices", :render => "_devices" %>

sveredyuk commented 10 years ago

I has the same problem... and also after controller code:

respond_to do |format| format.html ajax_respond format, section_id: "message", render: "_msg" end

in partial render zone i got error: Can't convert string into Hash

mryave commented 9 years ago

if this is of any help: I commented the warning code within the gem itself. gems/ajax_pagination-0.6.3/lib/assets/javascripts/ajax_pagination.js.erb line 197 // <% if AjaxPagination.warnings %> // alert("AJAX Pagination EXTRA_CONTENT_DISCARDED:\nExtra content returned by AJAX request ignored. Only a portion of the page content returned by the server was required. To fix this, explicitly call ajax_respond :section_id => \"" + section_id + "\" to render only the partial view required. This warning can be turned off in the ajax_pagination initializer file."); // <% end %>

The alert is all one line**

So far no other issues, will update if there are. You're more or less telling rails to do the same thing through the config file.