Module: Devise::Generators::OrmHelpers
- Defined in:
- lib/generators/devise/orm_helpers.rb
Instance Method Summary collapse
Instance Method Details
#model_contents ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/generators/devise/orm_helpers.rb', line 4 def model_contents <<-CONTENT # Include default devise modules. Others available are: # :token_authenticatable, :confirmable, :lockable and :timeoutable devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable CONTENT end |
#model_exists? ⇒ Boolean
14 15 16 |
# File 'lib/generators/devise/orm_helpers.rb', line 14 def model_exists? File.exists?(File.join(destination_root, model_path)) end |
#model_path ⇒ Object
18 19 20 |
# File 'lib/generators/devise/orm_helpers.rb', line 18 def model_path @model_path ||= File.join("app", "models", "#{file_path}.rb") end |