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
-
Bryan Larsen November 19th, 2010 @ 09:40 PM
- State changed from new to open
- Milestone set to Hobo 1.3 (Rails 3)
- Milestone order changed from 197922 to 0
-
Domizio Demichelis November 19th, 2010 @ 11:59 PM
- Assigned user set to Domizio Demichelis
Thank you Bryan. I was still with the 2.* in mind when I changed page_path :-)
I've also used the controller_action_from_page_path helper in the ajax_update_response. -
Domizio Demichelis November 20th, 2010 @ 12:01 AM
- State changed from open to resolved
(from [5bf47e486d955a670a21242a74325f362d2c9a62]) fixed a couple of deprecation warnings and used the page_path helper [#858 state:resolved] https://github.com/tablatom/hobo/commit/5bf47e486d955a670a21242a743...
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.
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
- 858 some depracation warnings (from [5bf47e486d955a670a21242a74325f362d2c9a62]) fixed a...