Sha256: 5127d35b6ff7e6f6675abe0095597740a4ce36c929e844e3c5d30352a6a5d90a

Contents?: true

Size: 840 Bytes

Versions: 2

Compression:

Stored size: 840 Bytes

Contents

module Admin
  module PostsHelper
    include ::PostsHelper

    def post_edit_content(post)
      content_tag :div, id: 'PostBody', postid: @post.id,
        class: %w(content),
        as: 'Editor.Content',
        contenteditable: true,
        href: admin_post_path(@post.id) do |div|

          if Rails.application.secrets.has_key?(:s3)
            div[:bucket] = Rails.application.secrets.s3['bucket'],
            div[:access_key] = Rails.application.secrets.s3['access_key'],
            div[:signature] = image_form_signature(image_form_policy(@post)),
            div[:policy] = image_form_policy(@post)
            if Rails.application.secrets.s3.has_key?('namespace')
              div['namespace'] = Rails.application.secrets.s3['namespace']
            end
          end

          post.content
        end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ecrire-0.21.0 lib/ecrire/app/helpers/admin/posts_helper.rb
ecrire-0.20.0 lib/ecrire/app/helpers/admin/posts_helper.rb