ruby - How to define a method for return array values for wrap_parameters in rails -


i'm new in rails , ruby, , can't figure out way doesn't work. believe more ruby thing rails.

if try thing:

class clientescontroller < applicationcontroller      wrap_parameters include: parametros_aceitos 

and have parametros_aceitos defined in clientescontroller this:

def parametros_aceitos     [         :cnpj, :razao_social, :nome_fantasia, :ie, :enderecos_attributes     ] end 

i got error:

actioncontroller::routingerror (undefined local variable or method `parametros_aceitos' clientescontroller:class)

thanks help


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -