lib/para/components_configuration.rb in para-0.5.4 vs lib/para/components_configuration.rb in para-0.6.2

- old
+ new

@@ -84,10 +84,12 @@ "Skipping components definition until next app reload." ) end tables_exist + rescue ActiveRecord::NoDatabaseError + false # Do not load components when the database is not installed end # Eager loads every file ending with _component.rb that's included in a # $LOAD_PATH directory which ends in "/components" # @@ -149,10 +151,10 @@ end end def refresh(attributes = {}) self.model = type.where(identifier: identifier).first_or_initialize - model.assign_attributes(attributes.merge(options_with_defaults)) + model.update_with(attributes.merge(options_with_defaults)) model.save! end # Ensures unset :configuration store options are set to nil to allow # removing a configuration option from the components.rb file