attributes_hash() private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File railties/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb, line 46
        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'"]
            elsif !virtual?(name)
              ["#{name}", "@#{singular_table_name}.#{name}"]
            end
          end.compact.sort.to_h
        end
Register or log in to add new notes.