Extract out Rails specific methods

* redirect_to is rails specific
Extract out Rails specific methods

* render is Rails specific method