Rails 应用程序的启动(登陆)页面 [英] splash (landing) page for rails app

查看:55
本文介绍了Rails 应用程序的启动(登陆)页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为 Rails 应用创建一个启动页面,其中包含一个电子邮件字段,供用户填写并在网站完全启动时收到通知.

最好的方法是什么?

我应该为登陆页面创建一个新的应用程序或者我应该使用同一个应用程序和一些变量集,比如:splash => true",它只能访问启动页面

这也有助于部署...

解决方案

  1. 添加启动页面

  2. 添加一个 before_action,它会临时重定向到启动页面,以将所有操作转到应用程序控制器.

  3. 当网站启动时禁用该before_action.

I am creating a splash page for a rails app which contains an email field for the user to fill up and get notified when the site is completely launched.

What is the best way to go with?

Should I create a new application just for landing page OR should I use the same app with some variable set like ":splash => true" which would give access only to the splash page

Which would also help in deployment...

解决方案

  1. Add a splash page

  2. Add a before_action that does a temp redirect to the splash page for all actions to your application controller.

  3. when the site is launched disable that before_action.

这篇关于Rails 应用程序的启动(登陆)页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆