Hola a todos,
me llamo Javier y estoy encantado de presentarme ante todos vosotros.
Soy
más o menos reciente en esto de rails, aunque estoy realmente encantado
con
él :-D.
Me ha surgido el siguiente problema y querÃa saber si alguien más se ha
encontrado con él. El tema es que las validaciones me han dejado de
funcionar al instalar el plugin Gibberish para multiidioma.
Tengo un modelo con el tÃpico validates_presecence_of :name. Si intento
salvar un objeto sin dicho atributo, me salta una excepción del tipo
ArgumentError.
Estoy utilizando la versión 2.3.2 de rails.
A continuación os pego la excepción que me da la aplicación. Muchas
gracias
por cualquier tipo de ayuda o consejo!
ArgumentError in ProvidersController#create
wrong number of arguments (3 for 2)
RAILS_ROOT: /home/javier/proyectos/rails/scsupplier
Application Trace http://localhost:3000/providers# | Framework
Tracehttp://localhost:3000/providers#| Full
Trace http://localhost:3000/providers#
/home/javier/proyectos/rails/scsupplier/vendor/rails/activerecord/lib/active_record/validations.rb:66:in
add' /home/javier/proyectos/rails/scsupplier/vendor/rails/activerecord/lib/active_record/validations.rb:66:in
add_on_blank’
/home/javier/proyectos/rails/scsupplier/vendor/rails/activerecord/lib/active_record/validations.rb:64:in
each' /home/javier/proyectos/rails/scsupplier/vendor/rails/activerecord/lib/active_record/validations.rb:64:in
add_on_blank’
/home/javier/proyectos/rails/scsupplier/vendor/rails/activerecord/lib/active_record/validations.rb:518:in
validates_presence_of' /home/javier/proyectos/rails/scsupplier/vendor/rails/activesupport/lib/active_support/callbacks.rb:182:in
call’
/home/javier/proyectos/rails/scsupplier/vendor/rails/activesupport/lib/active_support/callbacks.rb:182:in
evaluate_method' /home/javier/proyectos/rails/scsupplier/vendor/rails/activesupport/lib/active_support/callbacks.rb:166:in
call’
/home/javier/proyectos/rails/scsupplier/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:in
run' /home/javier/proyectos/rails/scsupplier/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:in
each’
/home/javier/proyectos/rails/scsupplier/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:in
send' /home/javier/proyectos/rails/scsupplier/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:in
run’
/home/javier/proyectos/rails/scsupplier/vendor/rails/activesupport/lib/active_support/callbacks.rb:276:in
run_callbacks' /home/javier/proyectos/rails/scsupplier/vendor/rails/activerecord/lib/active_record/validations.rb:1029:in
valid_without_callbacks?’
/home/javier/proyectos/rails/scsupplier/vendor/rails/activerecord/lib/active_record/callbacks.rb:315:in
valid?' /home/javier/proyectos/rails/scsupplier/vendor/rails/activerecord/lib/active_record/validations.rb:1008:in
save_without_dirty’
/home/javier/proyectos/rails/scsupplier/vendor/rails/activerecord/lib/active_record/dirty.rb:79:in
save_without_transactions' /home/javier/proyectos/rails/scsupplier/vendor/rails/activerecord/lib/active_record/transactions.rb:229:in
send’
/home/javier/proyectos/rails/scsupplier/vendor/rails/activerecord/lib/active_record/transactions.rb:229:in
with_transaction_returning_status' /home/javier/proyectos/rails/scsupplier/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:136:in
transaction’
/home/javier/proyectos/rails/scsupplier/vendor/rails/activerecord/lib/active_record/transactions.rb:182:in
transaction' /home/javier/proyectos/rails/scsupplier/vendor/rails/activerecord/lib/active_record/transactions.rb:228:in
with_transaction_returning_status’
/home/javier/proyectos/rails/scsupplier/vendor/rails/activerecord/lib/active_record/transactions.rb:196:in
save' /home/javier/proyectos/rails/scsupplier/vendor/rails/activerecord/lib/active_record/transactions.rb:208:in
rollback_active_record_state!’
/home/javier/proyectos/rails/scsupplier/vendor/rails/activerecord/lib/active_record/transactions.rb:196:in
save' /home/javier/proyectos/rails/scsupplier/app/controllers/providers_controller.rb:35:in
create’
/home/javier/proyectos/rails/scsupplier/app/controllers/application_controller.rb:31:in
set_language' /home/javier/proyectos/rails/scsupplier/app/controllers/application_controller.rb:31:in
set_language’