virtus icon indicating copy to clipboard operation
virtus copied to clipboard

[DISCONTINUED ] Attributes on Steroids for Plain Old Ruby Objects

Results 71 virtus issues
Sort by recently updated
recently updated
newest added

I added a fix for the rails 5 deprecation message as suggested in #362.

I'm using Rails 5 and this deprecation warning is been shown: DEPRECATION WARNING: Method to_hash is deprecated and will be removed in Rails 5.1, as `ActionController::Parameters` no longer inherits from...

I have a Child class of `Virtus::Attribute` called `SortedComponents` Which looks like this: ``` class SortedComponents < Virtus::Attribute def coerce(components) components = (components).sort! { |a, b| a["description"] b["description"] } components...

Hi @elskwid , With reference to - https://github.com/solnic/virtus/blob/68343e16f61644196b0a346713b46a8b29e7c2cf/spec/integration/embedded_value_spec.rb In this example, User has Address. And Address has City. As Virtus supports embedded value, how to show embedded values on Edit...

Right now Im using virtus in my rails project but Im having a problem to validate class attributes. This are the codes: ``` class NewAccountForm include Virtus extend ActiveModel::Naming extend...

# Returns all the attributes name defined on a Class # # @example # class User # include Virtus # # attribute :name, String # attribute :age, Integer # end...

Suppose I have a class `Foo`, which has an array of `Bar` objects, as follows: ``` ruby class Foo include Virtus.model attribute :bars, Array[Bar] end class Bar include Virtus.model attribute...

question

``` irb(main):016:0> Virtus::Attribute.build(true).is_a?(Virtus::Attribute::Boolean) => true irb(main):017:0> Virtus::Attribute.build(false).is_a?(Virtus::Attribute::Boolean) => false ``` Found it out while investigating a [bug](https://github.com/ruby-grape/grape/issues/1577) in grape.