jeudi 30 juillet 2015

How to assign value to field in rails_admin?

I am using RailsAdmin gem and I have some virtual attributes in model. I made input fields in rails_admin.rb initializer for that attributes like this:

  field :name, :string do
    formatted_value do
      "123123213213"
    end
    read_only false
  end

I tried to assign value to field like this but nothing is happening. Can anyone tell me where I am wrong?

Aucun commentaire:

Enregistrer un commentaire