aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapters/mysql2/connection_test.rb
diff options
context:
space:
mode:
authorŁukasz Strzałkowski <lukasz.strzalkowski@gmail.com>2013-12-08 22:24:27 +0100
committerŁukasz Strzałkowski <lukasz.strzalkowski@gmail.com>2013-12-08 22:29:07 +0100
commit2647d2f656ff203f45eecd7e19182018519d4064 (patch)
tree5beaca156b6994696c3a505812f119a6b624c911 /activerecord/test/cases/adapters/mysql2/connection_test.rb
parent9b8c0ff391cdaf23e5a74198ad29f8983df0b9d7 (diff)
downloadrails-2647d2f656ff203f45eecd7e19182018519d4064.tar.gz
rails-2647d2f656ff203f45eecd7e19182018519d4064.tar.bz2
rails-2647d2f656ff203f45eecd7e19182018519d4064.zip
Inline variants syntax
In most cases, when setting variant specific code, you're not sharing any code within format. Inline syntax can vastly simplify defining variants in those sitiations: respond_to do |format| format.js { render "trash" } format.html do |variant| variant.phone { redirect_to progress_path } variant.none { render "trash" } end end ` Becomes: respond_to do |format| format.js { render "trash" } format.html.phone { redirect_to progress_path } format.html.none { render "trash" } end
Diffstat (limited to 'activerecord/test/cases/adapters/mysql2/connection_test.rb')
0 files changed, 0 insertions, 0 deletions