Does the security_code method of the user that you''re editing yield
the proper result? It needs to.
It should automatically select the one from the user record you''re
editing. Is the rest of the form nice?
Julian.
On 15/03/2006, at 11:54 PM, Lindsay Boyd wrote:
> In one of my partials, I have a selection list to allow the user to
> maintain a code against the User model object:
>
> <%= options = [["Select security question", ""]] +
> User::SECURITY_CODES
> select("user", "security_code", options)
%></p>
>
> When rendered by the New controller everything is OK. When rendered by
> the Edit controller, the "Select security question" is the
default
> option. I want the the current code displayed as the default. Is
> there a
> recommeded RoR approach, or must I code the options variable as
> required.
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails