2014-12-21 57 views
1

您好我使用Bootsy,它工作正常,不幸圖像上傳選項不工作我已經安裝了CarrierWave這也正常工作。Rails 4 WYSIWYG Bootsy圖像上傳選項不顯示

我的形式

<%= f.bootsy_area(:description) %> 

我的模型

class Page < ActiveRecord::Base 

     belongs_to :user 
     include Bootsy::Container 

     require 'carrierwave/orm/activerecord' 
     mount_uploader :attachment, AttachmentUploader 

     extend FriendlyId 

     friendly_id :title, use: :slugged 


     validates :title, :presence => true 
     validates :slug, :presence => true 
     validates :user_id, :presence => true 

     def should_generate_new_friendly_id? 
     new_record? || !self.slug.present? && self.title.present? 
     end 

    end 

我控制器

def pages_params 
    params.require(:page).permit(:title, :description, :status, :slug, :user_id, :password, :attachment, :bootsy_image_gallery_id) 
end 

def create 
    @page = Page.new(pages_params) 

    if @page.save 
    redirect_to(:action => "index") 
    else 
    render("new") 
    end 
end 

任何任何意見和建議離子將不勝感激。謝謝

回答