-
Notifications
You must be signed in to change notification settings - Fork 91
Open
Description
Hello, I'm considering using this gem but I don't know if this is possible to do:
class Person
include ActiveAttr::Attributes
attribute :first_name
attribute :last_name
# we retreive data from the database with ActiveRecord
Languages.all.each do |lang|
attribute :"name_#{lang.name}", type: String
end
end
person = Person.new
person.first_name = "Chris"
person.last_name = "Griego"
person.name_english = "Christian"
person.name_spanish = "Cristian"
person.attributes #=> {"first_name"=>"Chris", "last_name"=>"Griego", "name_english" => "Christian", "name_spanish" => "Cristian"}I don't know if this is it: #6
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels