class DeviseFidoUsf::Generators::ViewsGenerator
Public Instance Methods
copy_views()
click to toggle source
# File lib/generators/devise_fido_usf/views_generator.rb, line 14 def copy_views view_directory :fido_usf_authentications view_directory :fido_usf_registrations end
Protected Instance Methods
plural_scope()
click to toggle source
# File lib/generators/devise_fido_usf/views_generator.rb, line 35 def plural_scope @plural_scope ||= scope.presence && scope.underscore.pluralize end
target_path()
click to toggle source
# File lib/generators/devise_fido_usf/views_generator.rb, line 31 def target_path @target_path ||= "app/views/#{plural_scope || :devise}" end
view_directory(name, opt_target_path = nil)
click to toggle source
# File lib/generators/devise_fido_usf/views_generator.rb, line 21 def view_directory(name, opt_target_path = nil) directory name.to_s, opt_target_path || "#{target_path}/#{name}" do |content| if scope content.gsub "devise/fido_usf_registrations/device", "#{plural_scope}/fido_usf_registrations/device" else content end end end