Sha256: 77548d9a8c250352a80de202598fb5fd4b6f68076a69a2625ba4bcf4dd00682f

Contents?: true

Size: 567 Bytes

Versions: 40

Compression:

Stored size: 567 Bytes

Contents

module Dugway
  module Drops
    class ContactDrop < BaseDrop
      def name
        params[:name] ||= ''
      end

      def email
        params[:email] ||= ''
      end

      def subject
        params[:subject] ||= ''
      end

      def message
        params[:message] ||= ''
      end

      def captcha
        %{<img id="captcha_image" src="https://s3.amazonaws.com/bigcartel/captcha/28e3d1288cbc70c0cd1a2d10845f8e11e1a90d14.png">}
      end

      def sent
        request.path == '/contact' && request.post? && errors.blank?
      end
    end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
dugway-0.12.3 lib/dugway/liquid/drops/contact_drop.rb
dugway-0.12.2 lib/dugway/liquid/drops/contact_drop.rb
dugway-0.12.1 lib/dugway/liquid/drops/contact_drop.rb
dugway-0.12.0 lib/dugway/liquid/drops/contact_drop.rb
dugway-0.11.4 lib/dugway/liquid/drops/contact_drop.rb
dugway-0.11.3 lib/dugway/liquid/drops/contact_drop.rb
dugway-0.11.2 lib/dugway/liquid/drops/contact_drop.rb
dugway-0.11.1 lib/dugway/liquid/drops/contact_drop.rb
dugway-0.11.0 lib/dugway/liquid/drops/contact_drop.rb
dugway-0.10.5 lib/dugway/liquid/drops/contact_drop.rb
dugway-0.10.4 lib/dugway/liquid/drops/contact_drop.rb
dugway-0.10.3 lib/dugway/liquid/drops/contact_drop.rb
dugway-0.10.2 lib/dugway/liquid/drops/contact_drop.rb
dugway-0.10.1 lib/dugway/liquid/drops/contact_drop.rb
dugway-0.10.0 lib/dugway/liquid/drops/contact_drop.rb
dugway-0.9.0 lib/dugway/liquid/drops/contact_drop.rb
dugway-0.8.4 lib/dugway/liquid/drops/contact_drop.rb
dugway-0.8.3 lib/dugway/liquid/drops/contact_drop.rb
dugway-0.8.2 lib/dugway/liquid/drops/contact_drop.rb
dugway-0.8.1 lib/dugway/liquid/drops/contact_drop.rb