README.md in attribeauty-0.4.4 vs README.md in attribeauty-0.4.5
- old
+ new
@@ -131,16 +131,16 @@
#
def params_filter
Attribeauty::Params.with(request.params)
end
- # using container will exclude the value and yield:
+ # using root will exclude the value and yield:
# { title: "woo", email: { address: "hmm@yep.com" } }
#
def update_params
params_filter.accept do
- container :user do
+ root :user do
attribute :title, :string, required: true
attribute :email do
attribute :address, :string, exclude_if: [:empty?, :nil?]
attribute :valid, :boolean
attribute :ip_address, :string, exclude_if: :empty?
@@ -175,11 +175,11 @@
# This following with the accept! method
# will raise: Attribeauty::MissingAttributeError, "title required, email required"
#
def update_params
params_filter.accept! do
- container :user do
+ root :user do
attribute :title, :string, exclude_if: :nil?, required: true
attribute :email do
attribute :address, :string
attribute :valid, :boolean
attribute :ip_address, :string
@@ -213,10 +213,10 @@
# exclude_if and required will be passed onto all attributes
#
def update_params
params_filter.accept exclude_if: :nil?, required: true do
- container :user do
+ root :user do
attribute :title, :string,
attribute :email do
attribute :address, :string
attribute :valid, :boolean
attribute :ip_address, :string, allows: :nil?