Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

active_scaffold_camera

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

active_scaffold_camera

  • 0.1.1
  • Rubygems
  • Socket score

Version published
Maintainers
2
Created
Source

h1. Camera for ActiveScaffold

Currently, this plugin is compatible with ActiveScaffold >= 3.4 gem.

h2. Overview

This plugin adds a camera viewer to take a snapshot from camera on ActiveScaffold forms. It uses "SayCheese.js":https://github.com/leemachin/say-cheese

h2. Installation

You'll need at least ActiveScaffold 3.4 to use this

gem install active_scaffold_camera

h2. Usage

h4. Step 1

Set column to use :snapshot form_ui

h4. Step 2

Setup snapshot using options method on column

# app/controllers/visitors_controller.rb

class VisitorsController < ApplicationController
  active_scaffold :visitor do |config|
    config.columns[:signature].form_ui = :signaturepad
    config.columns[:signature].options = {:source => -1}
  end
end

Available options: video_not_supported, audio_not_supported, media_forbidden, source

Source can be set to use a specific source instead of displaying source selector. It must be the source index, and it can be negative index to start from end. If no device on that index, first device will be used.

If video_not_supported, audio_not_supported or media_forbidden are symbols they will be translated (using as_ method, so it must be on active_scaffold namespace). They have a default translation.

h4. Save image

Snapshot form_ui sends a data url, encoded on base64, of the image, so it should be saved on column of blob type.

h2. Support

If you have issues installing the plugin, search / post to the "Active Scaffold":http://groups.google.com/group/activescaffold forum or "Create an issue":http://github.com/activescaffold/active_scaffold_camera/issues

h2. Contributing

Fork, hack, push, and request a pull:

http://github.com/activescaffold/active_scaffold_camera/

h2. License

Released under the MIT license (included).

FAQs

Package last updated on 29 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc