Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
JackDanger-immutable_attributes
Advanced tools
When you want to prevent certain attributes from being changed once set you can declare them as immutable:
class MyModel < ActiveRecord::Base attr_immutable :permalink, :param_identifier end
When MyModel.find(:first).permalink = 'anything' is called it will raise an ImmutableAttributeError MyModel.new.permalink = 'works!' will properly set the value because the record is unsaved.
If you'd only like this to happen for certain conditions, and want to handle other attribute-writers, too (like update_attribute), you can use the validation.
validates_immutable :permalink
Configuration options for the validation:
Created by Jack Danger Canty @ http://6brand.com Released under the same licence as Rails (MIT)
FAQs
Unknown package
We found that JackDanger-immutable_attributes 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.