
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
DynamicForm holds a few helpers method to help you deal with your Rails3 models, they are:
input(record, method, options = {})
form(record, options = {})
error_message_on(object, method, options={})
error_messages_for(record, options={})
It also adds f.error_messages
and f.error_message_on
to your form builders.
Read /lib/action_view/helpers/dynamic_form.rb
for details of each method.
DynamicForm also includes DynamicErrors, which is a port of the custom-err-messages plugin, but built to work with Rails3. It gives you the option to not have your custom validation error message prefixed with the attribute name. Ordinarily, if you have, say:
validates_acceptance_of :accepted_terms, :message => 'Please accept the terms of service'
You'll get the following error message:
Accepted terms Please accept the terms of service
This plugin allows you to omit the attribute name for specific messages. All you have to do is begin the message with a '^' character. Example:
validates_acceptance_of :accepted_terms, :message => '^Please accept the terms of service'
Nigel Ramsay added the ability to specify a proc to generate the message.
validates_presence_of :assessment_answer_option_id,
:message => Proc.new { |aa| "#{aa.label} (#{aa.group_label}) is required" }
which gives an error message like: Rate (Accuracy) is required
DynamicForm can be installed as a gem in your Gemfile
:
gem 'dynamic_form'
or as a plugin by running this command:
rails plugin install git://github.com/joelmoss/dynamic_form.git
Copyright (c) 2010 David Heinemeier Hansson, released under the MIT license
FAQs
Unknown package
We found that dynamic_form 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
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.