Deprecation

December 19, 2007

Action Pack

components
use partials and helper methods instead
@params, @session, @flash, @request, @cookies, @headers, @response
Use the params, session, flash, etc methods instead of working with the instance variables directly.
url_for(:symbol, *args), redirect_to(:symbol, *args)
use named routes instead
render_text, render_template, etc.
Use e.g. render :text => …, render :template => …, etc.
redirect_to_path, redirect_to_url.
Use redirect_to.
post_format, formatted_post?, xml_post?, yaml_post?
Use respond_to or request.format.
start_form_tag and end_form_tag
Use form_tag with a block.
update_element_function
use RJS
link_to_image, link_image_to helper methods
use link_to(image_tag(..), url)
human_size helper alias
use number_to_human_size helper method

Active Record

find_first, find_all
Use find :first and find :all.
push_with_attributes
Use has_many :through for rich many-to-many associations.
*association*_count
Use *association*.count instead

Railties

Non-namespaced rake tasks like rake migrate.
Use rake db:migrate.

Powered by ScribeFire.

Entry Filed under: Deprecation, rails, ruby on rails. Tags: , , .

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Recent Posts

Tags

Active Record australian gp calendar date select capistrano capitalize debugging Debugging in rails edge rails formula 1 For those who dont want to update the prototype.js fun Fun baby fun google html in join javascript linus vs windows compatibility linux logging love song malaysian gp 2008 results melbourne migrations music mysql plugin poetry rails regexp regular expression results formula 1 opening race romantic poetry ror Ruby ruby on rails safe html sms song SQL string case handler for strings syantax syntax error for migrations on linux Text Area they can checkout 1.8.3 of the calender date select

Blogroll

Pages