adding debug info for fixtures

Oleg committed Jun 15, 2011
commit ecfbc3fd1bdfcc84493a0356ffa111a3d80f4a71
Showing 2 changed files with 13 additions and 4 deletions
app/assets/javascripts/comfortable_mexican_sofa/application.js +1 -1
@@ @@ -26,7 +26,7 @@ $.CMS = function(){
enable_sortable_list: function(){
$('ul.sortable, ul.sortable ul').sortable({
handle: 'div.dragger',
- axis: 'y',
+ axis: 'y',
update: function(){
$.post(current_path + '/reorder', '_method=put&'+$(this).sortable('serialize'));
}
comfortable_mexican_sofa/fixtures.rb b/lib/comfortable_mexican_sofa/fixtures.rb +12 -3
@@ @@ -51,7 +51,10 @@ module ComfortableMexicanSofa::Fixtures
# saving
layout.parent = parent
- layout.save! if layout.changed?
+ if layout.changed?
+ layout.save!
+ Rails.logger.debug "[Fixtures] Saved Layout {#{layout.slug}}"
+ end
layout_ids << layout.id
# checking for nested fixtures
@@ @@ -105,7 +108,10 @@ module ComfortableMexicanSofa::Fixtures
# saving
page.blocks_attributes = blocks_attributes if blocks_attributes.present?
- page.save! if page.changed? || blocks_attributes.present?
+ if page.changed? || blocks_attributes.present?
+ page.save!
+ Rails.logger.debug "[Fixtures] Saved Page {#{page.full_path}}"
+ end
page_ids << page.id
# checking for nested fixtures
@@ @@ -146,7 +152,10 @@ module ComfortableMexicanSofa::Fixtures
end
# saving
- snippet.save! if snippet.changed?
+ if snippet.changed?
+ snippet.save!
+ Rails.logger.debug "[Fixtures] Saved Snippet {#{snippet.slug}}"
+ end
snippet_ids << snippet.id
end