Sha256: e6a025f9eb669763a6ef9531918fe86b66eb1754c2e896a3fa7f07ad9ff93e59

Contents?: true

Size: 704 Bytes

Versions: 26

Compression:

Stored size: 704 Bytes

Contents

module Admin
  class ImageBuilder < ActionView::Helpers::FormBuilder

    def message
      if object.header?
        content_tag :p, "You can replace your header by either <strong>clicking</strong> or <strong>dropping</strong> a picture here.".html_safe
      else
        content_tag :p, "Upload a picture for your post' header by either <strong>clicking</strong> or <strong>dropping</strong> a picture here".html_safe
      end
    end

    protected

    def t(*args)
      args.push({}) unless args.last.is_a?(Hash)
      args.last[:scope] = %w(admin form image)
      I18n.t *args
    end

    def method_missing(method, *args, &block)
      @template.send(method, *args, &block)
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
ecrire-0.31.2 lib/ecrire/app/forms/admin/image_builder.rb
ecrire-0.31.1 lib/ecrire/app/forms/admin/image_builder.rb
ecrire-0.31.0 lib/ecrire/app/forms/admin/image_builder.rb
ecrire-0.30.3 lib/ecrire/app/forms/admin/image_builder.rb
ecrire-0.30.2 lib/ecrire/app/forms/admin/image_builder.rb
ecrire-0.30.1 lib/ecrire/app/forms/admin/image_builder.rb
ecrire-0.30.0 lib/ecrire/app/forms/admin/image_builder.rb
ecrire-0.29.0 lib/ecrire/app/forms/admin/image_builder.rb
ecrire-0.28.3 lib/ecrire/app/forms/admin/image_builder.rb
ecrire-0.28.2 lib/ecrire/app/forms/admin/image_builder.rb
ecrire-0.28.1 lib/ecrire/app/forms/admin/image_builder.rb
ecrire-0.28.0 lib/ecrire/app/forms/admin/image_builder.rb
ecrire-0.27.0 lib/ecrire/app/forms/admin/image_builder.rb
ecrire-0.26.3 lib/ecrire/app/forms/admin/image_builder.rb
ecrire-0.26.2 lib/ecrire/app/forms/admin/image_builder.rb
ecrire-0.26.1 lib/ecrire/app/forms/admin/image_builder.rb
ecrire-0.26.0 lib/ecrire/app/forms/admin/image_builder.rb
ecrire-0.25.2 lib/ecrire/app/forms/admin/image_builder.rb
ecrire-0.25.1 lib/ecrire/app/forms/admin/image_builder.rb
ecrire-0.25.0 lib/ecrire/app/forms/admin/image_builder.rb