Я просто пытаюсь понять часть Rails, в частности, вокруг accessible_attributesПочему у access_attributes есть пустая строка?
Смотрите пример ниже:
irb(main):001:0> Ec2TypeSpecification.accessible_attributes
=> #<ActiveModel::MassAssignmentSecurity::WhiteList: {"", "api_name", "api_size", "api_type", "cores", "core_type", "compute_units", "ebs_optimization", "ephemeral_drives", "io_performance", "max_ips", "memory", "name", "support_32_bit", "support_64_bit", "total_ephemeral_storage"}>
Почему пустая строка? Что оно делает? Или, что-то сломано с моей моделью?
gem 'rails', '3.2.13'
EDIT: добавить модель
Вот и вся модель (я не очень далеко в моем проекте)
class Ec2TypeSpecification < ActiveRecord::Base
attr_accessible :api_name, :api_size, :api_type, :cores, :core_type, :compute_units, :ebs_optimization,
:ephemeral_drives, :io_performance, :max_ips, :memory, :name, :support_32_bit, :support_64_bit,
:total_ephemeral_storage
end
Можете ли вы пройти мимо части своей модели? – tibbon