update (lib/generators/templates/resource_controller/app/controllers/%file_name%.rb)

    # File lib/generators/templates/resource_controller/app/controllers/%file_name%.rb, line 43
      def update
        @<%= singular_model %> = <%= model_class_name %>.find_by_id(params[:id])
        raise NotFound unless @<%= singular_model %>
        if @<%= singular_model %>.update_attributes(params[:<%= singular_model %>])
          redirect url(:<%= (modules.collect{|m| m.downcase} << singular_model).join("_") %>, @<%= singular_model %>)
        else
          raise BadRequest
        end
      end