09
Nov 09


Hidden fields are similar to text fields, with one very important difference!

The difference is that the hidden field does not show on the page. Therefore the
visitor can't type anything into a hidden field, which leads to the purpose of the field:

To submit information that is not entered by the visitor.

 

Muito bom, resolve alguns problemas meus saber disso, rs. Da série: detalhes.

publicado por dessa às 15:17
tags: ,

22
Dez 08

  def assert_invalid(record, message)
   deny record.valid?, message
 end
 
 def deny(condition, message)
   assert !condition, message
 end
 
 def assert_association
(objeto, objeto2, message)
   association = objeto.reflect_on_association(objeto2)
   assert association, message
 end

 

def assert_has_one(objeto, objeto2, message)
 
  association = objeto.reflect_on_association(objeto2)
  
assert_equal :has_one, association.macro, message
 end
 
 def assert_has_many
(objeto, objeto2, message)
   association = objeto.reflect_on_association(objeto2)
   assert_equal :has_many, association.macro, message
 end
 
 def assert_belongs_to(objeto, objeto2, message)
   association = objeto.reflect_on_association(objeto2)
   assert_equal :belongs_to, association.macro, message
 end
 

publicado por dessa às 20:19
tags: ,

Dezembro 2009
Dom
Seg
Ter
Qua
Qui
Sex
Sab

1
2
3
4
5

6
7
8
9
10
11
12

13
14
15
16
17
18
19

20
21
22
23
24
25
26

27
28
29
30
31


subscrever feeds
pesquisar
 
Subscrever por e-mail

A subscrição é anónima e gera, no máximo, um e-mail por dia.

blogs SAPO