lib/smithy/content_blocks/registry.rb in smithycms-0.0.3 vs lib/smithy/content_blocks/registry.rb in smithycms-0.4.0

- old
+ new

@@ -18,10 +18,10 @@ def register(content_block) return unless ActiveRecord::Base.connection.table_exists?(Smithy::ContentBlock.table_name) return unless ActiveRecord::Base.connection.table_exists?(content_block.table_name) content_block_name = content_block.to_s.demodulize @@content_blocks << content_block_name unless @@content_blocks.include?(content_block_name) - cb = Smithy::ContentBlock.find_or_initialize_by_name(content_block_name) + cb = Smithy::ContentBlock.find_or_initialize_by(name: content_block_name) cb.save @@content_blocks end end end