
Security News
npm ‘is’ Package Hijacked in Expanding Supply Chain Attack
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.
Add this line to your application's Gemfile:
gem 'ajax_canvas_field'
And then execute:
$ bundle
Or install it yourself as:
$ gem install ajax_canvas_field
$ rails g ajax_canvas_field
This add the following:
initializers/ajax_canvas_field.rb
AjaxCanvasField.configure(default_height: 400,
default_width: 400,
default_left_color: '#ff0000',
default_middle_color: '#00ff00',
default_right_color: '#0000ff')
assets/javascripts/application.js
//= require ajax_canvas_field
assets/stylesheets/application.scss
assets/stylesheets/application.scss.erb
assets/stylesheets/application.css.scss
*= require ajax_canvas_field
This Gem provides you with some View-Helper for Rails
canvas_field
Provides the main canvas_field with id: #canvas_field# options
:namespace # URL Namespace for ajax-POST e.g. 'api/v1'
:controller # URL Controller for ajax-POST e.g. 'canvas_fields'
:background_url # File-Path for background image
canvas_data_field(active)
Provides a data-Field for different datasets# args
:active (bool) # Is this the active data field?
# options
:additional_data # Additional Data to provide to the AJAX-POST
:initial_data # The Initial-Data that is loaded
:content # Symbol that appears in the Dot
canvas_legend_field
Renders a Legend Table for the Field# options
:left_text # Text for left Click
:middle_text # Text for middle Click
:right_text # Text for right Click
:left_color # Color for left Click e.g. '#ffff00'
:middle_color # Color for middle Click e.g. '#ffff00'
:right_color # Color for right Click e.g. '#ffff00'
:no_icon # Hide Mouse-Icon-Row
:no_header # Hide Header
ro_canvas_field
Provides readonly canvas_fields with class: .canvas_field, for showing the results of all datasets on one Page# options
:background_url # File-Path for background image
Bug reports and pull requests are welcome on GitHub at https://github.com/datyv/ajax_canvas_field. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that ajax_canvas_field demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.
Security News
A critical flaw in the popular npm form-data package could allow HTTP parameter pollution, affecting millions of projects until patched versions are adopted.
Security News
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.