#858 ✓resolved
Tomoaki Hayasaka

some depracation warnings

Reported by Tomoaki Hayasaka | November 17th, 2010 @ 07:34 PM | in Hobo 1.3 (Rails 3)

In hobo-1.3.0.pre17, I found some deprecated calls.

Fix:

diff --git a/hobo/lib/hobo/controller.rb b/hobo/lib/hobo/controller.rb
index 887ca46..59a96ef 100644
--- a/hobo/lib/hobo/controller.rb
+++ b/hobo/lib/hobo/controller.rb
@@ -71,7 +71,7 @@ module Hobo
 
     def ajax_update_response(page_path, render_specs, results={})
       if page_path
-        rr = ActionController::Routing::Routes.recognize_path(page_path)
+        rr = Rails.application.routes.recognize_path(page_path)
         identifier = view_context.view_paths.find( rr[:action],
                                                    rr[:controller],
                                                    false,
diff --git a/hobo/lib/hobo/helper.rb b/hobo/lib/hobo/helper.rb
index 50bf986..3592b02 100644
--- a/hobo/lib/hobo/helper.rb
+++ b/hobo/lib/hobo/helper.rb
@@ -127,7 +127,7 @@ module Hobo
 
 
     def recognize_page_path
-      ActionController::Routing::Routes.recognize_path(params[:page_path])
+      Rails.application.routes.recognize_path(params[:page_path])
     end
 
     def url_for_page_path(options={})
diff --git a/hobo/lib/hobo/rapid/taglibs/rapid_forms.dryml b/hobo/lib/hobo/rapid/taglibs/rapid_forms.dryml
index 560ae5f..728b670 100644
--- a/hobo/lib/hobo/rapid/taglibs/rapid_forms.dryml
+++ b/hobo/lib/hobo/rapid/taglibs/rapid_forms.dryml
@@ -783,7 +783,7 @@ If you wish to set `min-chars` to 0, you will require this [patch to controls.js
     <h2 param="heading"><t key="activerecord.errors.template.header" model="&this.class.model_name.human" count="&this.errors.size"/></h2>
     <t key="activerecord.errors.template.body"></t>
     <ul param>
-      <% this.errors.each_full do |message| -%>
+      <% this.errors.to_a.each do |message| -%>
       <li param><%= message %></li>
       <% end -%>
     </ul>

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket

Referenced by

Pages