i want to get value from 2 diffrent field, first
from text_field, and second from select_date, and i want to save it in
one field "TTL" in database, this is the syntax,
i change my model file to be like this:

class Anggotum < ActiveRecord::Base
  set_table_name "anggota"
  attr_accessible :NP, :Nama, :Alamat, :TTL, :Telp, :Email, :Password,
:Waktu_Daftar, :Posisi, :Jenis_Kelamin
  attr_accessor           :tempat, :tanggal, :as=> :TTL
end

and in my form.html.rb that connect to new.html.rb i add this syntax

<div class="field">
    <%= f.label :ttl %></td><td>
    <%= f.label :":" %></td><td>
    <%= f.text_field :tempat %>
    <tr>
  <td colspan="3" align="right">
    <%= select_date :tanggal %></td></tr>
  </div>

but it make this error
{:as=>:TTL} is not a symbol

can you help me?

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to