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.8.0 lib/dugway/liquid/drops/contact_drop.rb
dugway-0.7.1 lib/dugway/liquid/drops/contact_drop.rb
dugway-0.7.0 lib/dugway/liquid/drops/contact_drop.rb
dugway-0.6.7 lib/dugway/liquid/drops/contact_drop.rb
dugway-0.6.6 lib/dugway/liquid/drops/contact_drop.rb
dugway-0.6.5 lib/dugway/liquid/drops/contact_drop.rb
dugway-0.6.4 lib/dugway/liquid/drops/contact_drop.rb
dugway-0.6.3 lib/dugway/liquid/drops/contact_drop.rb
dugway-0.6.2 lib/dugway/liquid/drops/contact_drop.rb
dugway-0.6.1 lib/dugway/liquid/drops/contact_drop.rb
dugway-0.6.0 lib/dugway/liquid/drops/contact_drop.rb
dugway-0.5.9 lib/dugway/liquid/drops/contact_drop.rb
dugway-0.5.8 lib/dugway/liquid/drops/contact_drop.rb
dugway-0.5.7 lib/dugway/liquid/drops/contact_drop.rb
dugway-0.5.6 lib/dugway/liquid/drops/contact_drop.rb
dugway-0.5.4 lib/dugway/liquid/drops/contact_drop.rb
dugway-0.5.3 lib/dugway/liquid/drops/contact_drop.rb
dugway-0.5.2 lib/dugway/liquid/drops/contact_drop.rb
dugway-0.5.1 lib/dugway/liquid/drops/contact_drop.rb
dugway-0.5.0 lib/dugway/liquid/drops/contact_drop.rb