Displaying 2 results from an estimated 2 matches for "komandancias".
2006 Apr 29
1
can i alter the _form.rhtml without have troubles to validat
...a problem
i alter the _form.rhtml to display a select option in the place a simple
text_box, and the application work very well, but in the moment that i
apply a validation in the model i get a error.
the code is the next
in the controller:
def new
@catelemento = Catelemento.new
@komandancias = Catcomandancia.find(:all)
end
in the _form.rhtml
<%= error_messages_for ''catelemento'' %>
<!--[form:catelemento]-->
<p><label for="catelemento_Comandancia">Comandancia</label><br/>
<select id="catelemento_Comandancia&qu...
2006 Apr 28
7
a simple problem but difficult
...ta to access
the question is how to access comandancia in @acceso
this code is wrong :
def new
@catelemento = Catelemento.new
@acceso= Catacceso.find(:all,
:conditions => ["Usuario = ?",
session.[:user_id]])
@komandancias = Catcomandancia.find(:all,
:conditions => ["id = ?",
@acceso.Comandancia ])
end
--
Posted via http://www.ruby-forum.com/.