DORSETRIGS
Home

activemodel (4 post)


posts by category not found!

Using `assign_attributes` saves `has_many through:` association immediately

Rails Magic Using assign attributes for Instant has many through Association Updates Lets dive into a common challenge faced by Rails developers working with ha

2 min read 07-10-2024 66
Using `assign_attributes` saves `has_many through:` association immediately
Using `assign_attributes` saves `has_many through:` association immediately

Should I validate the type column? (Rails, STI)

Validating the type Column in Rails with Single Table Inheritance STI Single Table Inheritance STI is a powerful feature in Rails that allows you to represent d

2 min read 06-10-2024 44
Should I validate the type column? (Rails, STI)
Should I validate the type column? (Rails, STI)

Register an ActiveModel attribute type with the ability to pass options to it?

Registering an Active Model Attribute Type with Options in Ruby on Rails In Ruby on Rails Active Model allows you to create custom data types that can be used i

2 min read 19-09-2024 64
Register an ActiveModel attribute type with the ability to pass options to it?
Register an ActiveModel attribute type with the ability to pass options to it?

How to prevent password from being updated if empty in Rails Model and test it with RSpec?

Keeping Your Rails Users Secure Preventing Empty Password Updates In the realm of Rails development ensuring robust user management is paramount A crucial aspec

2 min read 02-09-2024 61
How to prevent password from being updated if empty in Rails Model and test it with RSpec?
How to prevent password from being updated if empty in Rails Model and test it with RSpec?