RailsCasts Pro episodes are now free!

Learn more or hide this

Recent Comments

Avatar

This episode has been updated for Rails 5 as a blog post. Catch All Route in Rails 5

Avatar

This episode has been updated for Rails 5 as a blog post. Blocks in View

Avatar

This episode has been updated for Rails 5 as a blog post. Customize Field Error in Rails 5

Avatar

This episode has been updated for Rails 5 as a blog post. Multi Button Form in Rails 5

Avatar

This has been updated to Rails 5 as a blog post. Simple Search Form in Rails 5

Avatar

This has been updated to Rails 5 as a blog post. Custom REST Actions in Rails 5

Avatar

Thanks so much! Wonderful pretty simple example!

Avatar

This episode has been updated for Rails 5 as a blog post. Named Routes in Rails 5

Avatar

This episode has been updated for Rails 5 as a blog post. Date Validation Gems in Rails 5

Avatar

This episode has been updated for Rails 5 as a blog post. Time in Text Field in Rails 5

Avatar

This episode has been updated for Rails 5 as a blog post. Customizing Time Format in Rails 5 Apps

Avatar

This episode has been updated for Rails 5 as a blog post. Pretty Page Title in Rails 5

Avatar

This episode has been updated for Rails 5 as a blog post. Group By Month in Rails 5

Avatar

This episode has been updated for Rails 5 as a blog post. In Groups Of in Rails 5

Avatar

This episode has been updated for Rails 5 as a blog post. Mass Assignment in Rails 5

Avatar

This episode has been updated for Rails 5 as a blog post. Cross Site Scripting in Rails 5

Avatar

This episode has been updated for Rails 5 as a blog post. SQL Injection in Rails 5 Apps

Avatar

This episode has been updated for Rails 5 as a blog post. Using Rails Foonotes in Rails 5 Apps

Avatar

This episode has been updated for Rails 5 as a blog post. Counter Cache Column in Rails 5

Avatar

This episode has been updated for Rails 5 as a blog post. Eager Loading in Rails 5

Avatar

This episode has been updated for Rails 5 as a blog post. Looping Through Flash in Rails 5

Avatar

For Rails 3.2 >=, you can create an app/middleware dir for response_timer.rb and just add

config.middleware.use "ResponseTimer"

to the Rails.application.configure block in config/environments/development.rb

Avatar

This episode has been updated for Rails 5 as a blog post. Virtual Attributes in Rails 5

Avatar

This episode has been updated for Rails 5 as a blog post. Model Tests in Rails 5

Avatar

This episode has been updated to Rails 5 as a blog post Layouts in Rails 5

Avatar

Talent wins games, but teamwork and intelligence wins championships.I enjoy being at home. http://www.essayvalley.co.uk/write-my-essay/

Avatar

This episode has been updated to Rails 4.2 as an article Find Through Association.

Avatar

The second episode of Railscast is now updated for Rails 4.2.5 as a blog post. Check out the Active Record Basics

Avatar

In Rails 4.2.5, you don't need to do it. You can see the details here Caching Database Results in Rails 4.2.5

Avatar

I have the exact same problem as you have NanduShah. Did you manage to fix it in your case? I still can´t figure out what´s wrong with my code.

All the best
Dadi

Avatar

i like your opinion. this post is giving a message. i likt it. thanks for share it.
http://www.webtechcoupons.com/offers/udemy/

Avatar

Thanks for sharing this great info with us as I am operating many of social sites pages like moviestarplanethacked.net and therefore I need of something that could help me to trigger multiple actions at the same time as it is quite time consuming to get things done one by one.

Avatar

I guess that this approach is very bad like Backend-development
cuz its calls all the cities from the database and that is not good for the site performance !
plz if some one is not agree write a replay!
best solution is using ajax that remote trigger the controller method that find the cities of the chosen county and push it to
city select tag by js file "similar to 88"

Avatar

I've never thought of that. Thanks for sharing.
- http://number1papers.com

Avatar

Using FontAwesome as chevron

def sortable(column, title = nil)
title ||= column.titleize
css_class = column == sort_column ? "current #{sort_direction}" : nil
direction = column == sort_column && sort_direction == "asc" ? "desc" : "asc"
link_to (("#{title} #{content_tag(:i, '', :class => "fa fa-chevron-#{direction == 'asc' ? 'up': 'down'}", :style => "font-size: 6px;") if css_class.present?}").html_safe), params.merge(:sort => column, :direction => direction, :page => nil), {:class => css_class}
end