Sha256: 7cb05ff7f017345bd7e30f60a2a65ee5a72f5a94935a3cbb7657f2893c59824d
Contents?: true
Size: 1.38 KB
Versions: 13
Compression:
Stored size: 1.38 KB
Contents
class SecurityPageModelsMigration < Migration def self.up(site) site.pages.create_model :login_pages do |login_pages| add_field :username_field, :string, validations: {required: {}}, default: 'username' add_field :password_field, :string, validations: {required: {}}, default: 'password' add_one :redirect_to, model: :page login_pages.record_class_name = 'LoginPage' end site.pages.create_model :logout_pages do |logout_pages| add_one :redirect_to, model: :page logout_pages.record_class_name = 'LogoutPage' end site.pages.create_model :password_reset_pages do |password_reset_pages| add_field :success, :html, default: 'Thank you, your password has been emailed to your email address.' add_field :email_field, :string, validations: {required: {}}, default: 'email' password_reset_pages.record_class_name = 'PasswordResetPage' end site.pages.create_model :facebook_login_pages do |facebook_login_pages| add_field :callback_uri, :string add_field :app_id, :string add_field :app_secret, :string add_one :join_page, model: :page add_one :after_login_page, model: :page facebook_login_pages.record_class_name = 'FacebookLoginPage' end end def self.down(site) site.login_pages.destroy site.logout_pages.destroy site.password_reset_pages.destroy end end
Version data entries
13 entries across 13 versions & 3 rubygems