Benign gem 886,046,342 installs Download

activemodel 7.1.5.2

“A toolkit for building modeling frameworks like Active Record. Rich support for attributes, callbacks, validations, serialization, internat…”

At least four Markdown section headingsRuby bitwise XOR expression
SHA-2564fb6a56a8614ee820c218563fcdebcf0d7b16ab153b81ecd2ed91877cf4ac8b5

Evidence

Ruby class_eval call callbacks.rb · lines 60–72
⋯5 lines
65 module Callbacks
66 def self.extended(base) # :nodoc:
67 base.class_eval do
68 include ActiveSupport::Callbacks
69 end
70 end
71
72 # +define_model_callbacks+ accepts the same options +de …
Ruby dynamically invokes a method with send callbacks.rb · lines 114–129
⋯7 lines
121
122 types.each do |type|
123 send("_define_#{type}_model_callback", self, callback)
124 end
125 end
⋯4 lines
Python module-level function call README.rdoc · lines 180–197
180:48… "
181
182 {Learn more}[link:classes/ActiveModel/Serialization.html]
183
184* Internationalization (i18n) support
185
186 class Person
187 extend ActiveModel::Translation
188 end
189
190 Person.human_attribute_name('my_attribute')
191 # => "My attribute"
192
⋯5 lines
GitHub service name README.rdoc · lines 241–251
241
242Source code can be downloaded as part of the \Rails project on GitHub
243
244* https://github.com/rails/rails/tree/main/activemodel
245
246
⋯5 lines
Ruby public_send method dispatch attribute_assignment.rb · lines 1–48
1# frozen_string_literal: true
2
3require "active_support/core_ext/hash/keys"
4
5module ActiveModel
6 module AttributeAssignment
7 include ActiveModel::ForbiddenAttributesProtection
8
9 # Allows you to set all the attributes by passing in a hash of attributes with
10 # keys matching the attribute names.
11 #
12 # If the passed hash responds to <tt>permitted?</tt> method and the return value
13 # of this method is +false+ an ActiveModel::ForbiddenAttributesError
14 # exception is raised.
15 #
⋯33 lines

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.