method
attributes_hash
v4.2.1 -
Show latest stable
- Class:
TestUnit::Generators::ScaffoldGenerator
attributes_hash()private
No documentation available.
# File railties/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb, line 20
def attributes_hash
return if attributes_names.empty?
attributes_names.map do |name|
if %(password password_confirmation).include?(name) && attributes.any?(&:password_digest?)
"#{name}: 'secret'"
else
"#{name}: @#{singular_table_name}.#{name}"
end
end.sort.join(', ')
end