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

android - questions about switching from C2DM to GCM -

c++ - Qt setGeometry: Unable to set geometry -

batch file - How to extract all multi-volume RAR archives from subfolders of a folder? -