class Bootstrap::Generators::DeviseGenerator
Public Instance Methods
copy_confirmation()
click to toggle source
# File lib/generators/bootstrap/devise_generator.rb, line 19 def copy_confirmation template "#{file_template_location('confirmations/new')}.tt", "app/views/devise/confirmations/new.html.#{options[:template_engine]}" end
copy_mailers()
click to toggle source
# File lib/generators/bootstrap/devise_generator.rb, line 23 def copy_mailers directory "#{options[:template_engine]}/mailer", 'app/views/devise/mailer' end
copy_passwords()
click to toggle source
# File lib/generators/bootstrap/devise_generator.rb, line 27 def copy_passwords %i[edit new].map do |file| template "#{file_template_location("passwords/#{file}")}.tt", "app/views/devise/passwords/#{file}.html.#{options[:template_engine]}" end end
copy_registrations()
click to toggle source
# File lib/generators/bootstrap/devise_generator.rb, line 33 def copy_registrations %i[edit new].map do |file| template "#{file_template_location("registrations/#{file}")}.tt", "app/views/devise/registrations/#{file}.html.#{options[:template_engine]}" end end
copy_sessions()
click to toggle source
# File lib/generators/bootstrap/devise_generator.rb, line 39 def copy_sessions template "#{file_template_location('sessions/new')}.tt", "app/views/devise/sessions/new.html.#{options[:template_engine]}" end
copy_unlock()
click to toggle source
# File lib/generators/bootstrap/devise_generator.rb, line 43 def copy_unlock template "#{options[:template_engine]}/unlocks/new.html.#{options[:template_engine]}.tt", "app/views/devise/unlocks/new.html.#{options[:template_engine]}" end
Private Instance Methods
file_template_location(file_location = '')
click to toggle source
# File lib/generators/bootstrap/devise_generator.rb, line 53 def file_template_location(file_location = '') return '' if file_location.blank? # Depending if simpleform is to be used, it will return a path similar to one of the following: # => slim/unlocks/new.html.slim || simple_form/slim/unlocks/new.html.slim "#{simple_path}#{options[:template_engine]}/#{file_location}.html.#{options[:template_engine]}" end
simple_path()
click to toggle source
If simpleform is going ot be used with the forms return a simple_form path
# File lib/generators/bootstrap/devise_generator.rb, line 62 def simple_path options[:simpleform] ? 'simple_form/' : '' end