 <p>In my opinion the simplest solution:</p> <pre><code>#controllers/application_controller.rb protected def ckeditor_pictures_scope(options = { :assetable_id =&gt; "#{current_page.id}" ,:assetable_type =&gt; "Page" }) ckeditor_filebrowser_scope(options) end def ckeditor_attachment_files_scope(options = { :assetable_id =&gt; "#{current_page.id}" ,:assetable_type =&gt; "Page" }) ckeditor_filebrowser_scope(options) end def ckeditor_before_create_asset(asset) asset.assetable = current_page if current_page return true end </code></pre>