respond_with / respond_to / redirect_to • send_data / send_ fi le / render( fi le: fi le) • show.html.erb / show.json.jbuilder • View variants • show.html+mobile.erb • render :show, variants: [:mobile, :desktop] • request.variant = :redesign
request.variant = :theme • Use as status: success & failure • Use as data source • View helpers • Pre fi x with namespace • No instance variables • Controller helpers • De fi ne requirements in fi rst stage • Controller modules • Group helpers in fi rst stage • Group logics in second stage