How to generate a rails link with an AR validation message -


i'd give link contact page on failure of validation. i've tried no avail:

validates_acceptance_of :not_an_agency, :on => :create, :message => "must confirmed. if agency please #{link_to "contact us", contact_path}" 

anyone know how past one?

jack

as of rails 3.1 can do:

view_context.link_to "contact us", contact_path 

also, strict, original poster's code example missing close quote on "contact us"


Comments

Popular posts from this blog

c++ - Compiling static TagLib 1.6.3 libraries for Windows -

PostgreSQL 9.x - pg_read_binary_file & inserting files into bytea -

asp.net - call stack missing info on mono with apache and mod_mono -