lib/scaffolding/transformer.rb in bullet_train-super_scaffolding-1.0.17 vs lib/scaffolding/transformer.rb in bullet_train-super_scaffolding-1.0.20

- old
+ new

@@ -274,11 +274,11 @@ transform_hook = hook begin target_file_content = File.read(transformed_file_name) rescue Errno::ENOENT => _ - puts "Couldn't find '#{transformed_file_name}'".red unless (suppress_could_not_find || options[:suppress_could_not_find]) + puts "Couldn't find '#{transformed_file_name}'".red unless suppress_could_not_find || options[:suppress_could_not_find] return false end if target_file_content.include?(transformed_content) puts "No need to update '#{transformed_file_name}'. It already has '#{transformed_content}'." @@ -589,10 +589,10 @@ type = parts.join(":") boolean_buttons = type == "boolean" # extract any options they passed in with the field. # will extract options declared with either [] or {}. - type, attribute_options = type.scan(/^(.*)[\[|{](.*)[\]|}]/).first || type + type, attribute_options = type.scan(/^(.*){(.*)}/).first || type # create a hash of the options. attribute_options = if attribute_options attribute_options.split(",").map { |s| option_name, option_value = s.split("=")