Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
1Activity
0 of .
Results for:
No results containing your search query
P. 1
Message Block

Message Block

Ratings: (0)|Views: 80|Likes:
Published by Ben Hughes
Slides from my presentation at the December 2010 SDRuby meeting on my message_block Rails gem and testing gems with Cucumber using cukigem.
Slides from my presentation at the December 2010 SDRuby meeting on my message_block Rails gem and testing gems with Cucumber using cukigem.

More info:

Categories:Types, Speeches
Published by: Ben Hughes on Feb 08, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

08/17/2011

pdf

text

original

 
USER ALERTS IN RAILS WITH MESSAGE BLOCK 
Monday, February 7, 2011
 
 WHAT USER ALERTS?
Flash Messages:ActiveRecord Errors:
<%ifflash[:notice] %>  <p><%= h flash[:notice] %></p> <%end%>flash[:notice]= "User Created" classUser < ActiveRecord::Base validates_presence_of :login end<% form_for(@user)do|f| %> <%= error_messages_for:user%><%end%>
Monday, February 7, 2011
 
MESSAGE BLOCK FEATURES
Merges AR errors and flash messages together 
Groups by message type (confirm, error, warn, etc.)
Accepts flashes with array of strings
Pull AR errors from multiple models
Update via JavaScript for easy Ajax
Monday, February 7, 2011

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->