diff --git a/app/models/member.rb b/app/models/member.rb index 6d7546c..36a5221 100644 --- a/app/models/member.rb +++ b/app/models/member.rb @@ -1,4 +1,8 @@ class Member < ApplicationRecord + def self.default_scope + where.not(confirmed_at: nil).where.not(picture: nil) + end + # Include default devise modules. Others available are: # , :lockable, :timeoutable, :trackable and :omniauthable devise :database_authenticatable, :registerable,:confirmable, @@ -8,7 +12,7 @@ class Member < ApplicationRecord has_many :stories has_many :stories has_many :pictures - + validates :bio, length: { maximum: 1000 } validates :name , length: { minimum: 3 } diff --git a/config/environments/development.rb b/config/environments/development.rb index a427297..4a42f07 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -39,9 +39,9 @@ Rails.application.configure do # Don't care if the mailer can't send. config.action_mailer.raise_delivery_errors = false config.action_mailer.perform_caching = false - config.action_mailer.default_url_options = { host: 'localhost', port: 4000 } + config.action_mailer.default_url_options = { host: 'green-machine.local', port: 5000 } - routes.default_url_options = { host: 'localhost', port: 3000 } + routes.default_url_options = { host: 'green-machine.local', port: 5000 } # Print deprecation notices to the Rails logger.