The popular open-source contract for web professionals by Stuff & Nonsense
- Originally published: 23rd December 2008
- Revised date: March 15th 2016
- Original post
| namespace App\Http\Middleware; | |
| use Illuminate\Support\Facades\Log; | |
| class LogAfterRequest { | |
| public function handle($request, \Closure $next) | |
| { | |
| return $next($request); | |
| } |
| #Model | |
| @user.should have(1).error_on(:username) # Checks whether there is an error in username | |
| @user.errors[:username].should include("can't be blank") # check for the error message | |
| #Rendering | |
| response.should render_template(:index) | |
| #Redirecting | |
| response.should redirect_to(movies_path) |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <layout> | |
| <!-- ############# GLOBAL LAYOUT UPDATES ############# --> | |
| <default> | |
| <!-- Remove unwanted blocks entirely | |
| <remove name="right.poll"/> | |
| <remove name="right.permanent.callout"/> |