diff --git a/README.md b/README.md index 033d99c..b66efc8 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ Creates a backup model with an optional `cron` schedule. ### Attribute Parameters -* The name attribute - A symbol used as the trigger name. +* The name attribute - A string or symbol used as the trigger name. * `description` - A description for the backup. Default is the same as the name. * `definition` - A string (best formed as a heredoc) defining the backup. Will be interpoleted and turned into a model file. Required. * `schedule` - A hash of times (minute, hour, day, month, weekday) that will be passed to a [`cron` resource](http://docs.opscode.com/chef/resources.html#cron). diff --git a/resources/model.rb b/resources/model.rb index c1f552c..3dd631d 100644 --- a/resources/model.rb +++ b/resources/model.rb @@ -1,7 +1,7 @@ actions :create, :delete default_action :create -attribute :name, :kind_of => Symbol, :name_attribute => true, :required => true +attribute :name, :kind_of => [String, Symbol], :name_attribute => true, :required => true attribute :description, :kind_of => String attribute :definition, :kind_of => String