diff --git a/Gemfile b/Gemfile index a9813caa..1e6ce8fc 100644 --- a/Gemfile +++ b/Gemfile @@ -4,7 +4,7 @@ gem 'rails', '>=3.1.0.rc4' gem 'yajl-ruby', :require => 'yajl' gem 'bson_ext' -gem 'carrierwave', '0.5.6' +gem 'carrierwave', '0.5.4' gem 'ckeditor' gem 'devise' gem 'mini_magick' diff --git a/Gemfile.lock b/Gemfile.lock index 7177ff7e..74e4c8c1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -36,7 +36,7 @@ GEM bson (1.3.1) bson_ext (1.3.1) builder (3.0.0) - carrierwave (0.5.6) + carrierwave (0.5.4) activesupport (~> 3.0) chronic (0.6.2) ckeditor (3.6.1) @@ -171,7 +171,7 @@ PLATFORMS DEPENDENCIES bson_ext - carrierwave (= 0.5.6) + carrierwave (= 0.5.4) ckeditor coffee-rails (~> 3.1.0.rc) delorean diff --git a/app/controllers/admin/pages_controller.rb b/app/controllers/admin/pages_controller.rb index d6992c71..a0f4231e 100644 --- a/app/controllers/admin/pages_controller.rb +++ b/app/controllers/admin/pages_controller.rb @@ -21,14 +21,11 @@ class Admin::PagesController < ApplicationController @item = Page.new @item.is_published = true @item.parent_id = @parent_item.id rescue nil + @designs = Design.all.entries + @default_design = @designs.detect {|d| d.title.to_s == 'Bob' } end def edit - @item = Page.find(params[:id]) - # @item.content = parse_content(@item.content, {:locale => 'show'}) - @item.content = parse_page_code(@item) - @i18n_variable = @item.i18n_variable - @code = params[:code] end def create @@ -51,19 +48,6 @@ class Admin::PagesController < ApplicationController end def update - @item = Page.find(params[:id]) - parse_content_update_code(@item, params[:page][:content]) - if @item.update_attributes(params[:item]) - flash[:notice] = t('admin.update_success_page') - respond_to do |format| - format.html { - redirect_to admin_page_url(@item) - } - format.js {} - end - else - render :action => "edit" - end end def destroy diff --git a/app/helpers/admin/item_helper.rb b/app/helpers/admin/item_helper.rb index 7994cb25..e91265fc 100644 --- a/app/helpers/admin/item_helper.rb +++ b/app/helpers/admin/item_helper.rb @@ -12,7 +12,6 @@ module Admin::ItemHelper ret << "