I know this is going against ruby on rails conventions, but my id of this table doesn't need to auto-increment and I'm setting it through the logic. However, it's not saving to the database. Everything getting saved is saving as null for the id.
def self.up
create_table :probes, :id => false do |t|
t.string :id
t.string :name
t.integer :user_id
t.boolean :online
t.timestamps
end
end
<% form_for @probe do |f| %>
<%= f.error_messages %>
<p>
<%= f.label "Site name" %><br />
<%= f.text_field :name %>
</p>
<p style="margin-left: 10%">
<%= f.label "Probe Key" %><br />
<%= f.text_field :id, :value => @token %>
</p>
<p style="margin-left: 20%">
<%= link_to "Back to List", probes_path %>
<%= f.submit "Submit",:style => "margin-left: 75px;" %></p>
<% end %>
Is this even possible? Or is there somewhere besides the new.html.erb file that I should be changing/checking?