# Deprecated posts replaced with method \_\_\_\_\_\_\_?

**URL:** <https://www.ruby-forum.com/t/deprecated-posts-replaced-with-method/126615>\
**Category:** Rails\
**Created:** [January 20, 2008, 1:59pm UTC](https://www.ruby-forum.com/t/deprecated-posts-replaced-with-method/126615 "2008-01-20T13:59:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thufir](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ee7513/32.png) [@Thufir](https://www.ruby-forum.com/u/Thufir)\
**Post date:** [January 20, 2008, 1:59pm UTC](https://www.ruby-forum.com/t/deprecated-posts-replaced-with-method/126615/1 "2008-01-20T13:59:42Z")

</div>

Looking at this snippet:

thufir@arrakis ~/strawr $  
thufir@arrakis ~/strawr $ cat app/views/feeds/show.rhtml -n | head -n 36  
| tail -n 13  
24  
25 \<% if @feed.tags.empty? %\>  
26 (None)

27 \<% else %\>  
28 \<% for tag in @feed.tags %\>  
29 \<%= tag.tag %\>&nbsp;  
30 \<%= link\_to ‘Remove’, { :action =\> ‘remove\_tag’,  
31 :id =\> @feed, :which\_tag =\> tag.id },  
32 :confirm =\> ‘Are you sure?’, :post =\> true %\>  
33   
  
34 \<% end %\>  
35 \<% end %\>  
36  
thufir@arrakis ~/strawr $

[http://strawr.googlecode.com/svn/trunk/](http://strawr.googlecode.com/svn/trunk/)

I believe that the :post in line 32 is, or will be, deprecated:

Tag Load (0.003368) SELECT tags.\* FROM tags INNER JOIN memberships  
ON  
tags.id = memberships.tag\_id WHERE ((memberships.feed\_id = 1))  
Tag Columns (0.001263) SHOW FIELDS FROM tags  
DEPRECATION WARNING: Passing :post as a link modifier is deprecated.  
Use :method =\> “post” instead. :post will be removed in Rails 2.0. See  
[Ruby on Rails — A web-app framework that includes everything needed to create database-backed web applications according to the Model-View-Controller (MVC) pattern.](http://www.rubyonrails.org/deprecation) for details. (called from  
convert\_options\_to\_javascript! at /usr/lib/ruby/gems/1.8/gems/  
actionpack-1.13.5/lib/action\_view/helpers/url\_helper.rb:331)

Do I just make line 32:

```
  :confirm => 'Are you sure?', :method => "post" => true %>

```

I’m not sure what they’re getting at. Yes, I’ll read those links in the  
morning more thoroughly.

thanks,

Thufir

---

<div class="post-metadata">

**Author:** ![Thufir](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ee7513/32.png) [@Thufir](https://www.ruby-forum.com/u/Thufir)\
**Post date:** [January 20, 2008, 2:50pm UTC](https://www.ruby-forum.com/t/deprecated-posts-replaced-with-method/126615/2 "2008-01-20T14:50:42Z")

</div>

\<%= link\_to ‘Remove’, { :action =\> ‘remove\_tag’,  
:id =\> @feed, :which\_tag =\> tag.id },  
:confirm =\> ‘Are you sure?’, :method =\> :post %\>

That is how it should look. Replace the :post key with the :method key.  
So now you just say :method =\> :post or :method =\> :put, etc

---

<div class="post-metadata">

**Author:** ![Thufir](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ee7513/32.png) [@Thufir](https://www.ruby-forum.com/u/Thufir)\
**Post date:** [January 21, 2008, 1:00am UTC](https://www.ruby-forum.com/t/deprecated-posts-replaced-with-method/126615/3 "2008-01-21T01:00:05Z")

</div>

On Jan 20, 6:50 am, Nathan E. \<rails-mailing-l…@andreas-  
[s.net](http://s.net)\> wrote:

> \<%= link\_to ‘Remove’, { :action =\> ‘remove\_tag’,  
> :id =\> @feed, :which\_tag =\> tag.id },  
> :confirm =\> ‘Are you sure?’, :method =\> :post %\>
> 
> That is how it should look. Replace the :post key with the :method key.  
> So now you just say :method =\> :post or :method =\> :put, etc

Ah, thanks. I wasn’t seeing hot to include the :true

-Thufir
