search for: contactmethod

Displaying 4 results from an estimated 4 matches for "contactmethod".

2006 Jun 13
11
Question: Migration - multiple creates
I want to create a migration file that creates multiple tables, so i''m guessing the correct format would be: Can anyone confirm ? I''m guessing that each new create script requires a seperate class so formatted this way. Perhaps I''m wrong. TIA Stuart class CreateTable1 < ActiveRecord::Migration def self.up create_table :table1s do |t| t.column :length,
2006 Jun 22
11
Help please
...name) %></td> <td><%= (position.entered_on_date) %></td> </tr> Here is the method in the controller: def positionslist @positions = (Position.find_all) end The model: class Position < ActiveRecord::Base belongs_to :category belongs_to :contactmethod belongs_to :edureq belongs_to :expreq belongs_to :postlength belongs_to :securityclear belongs_to :state def self.find_all find(:all) end end Maybe something jumps out at someone ? TIA Stuart
2006 Jan 17
10
Is STI the only way to do inheritance?
I''m currently coding a system which must store multiple contact methods for a user (phone, email, postal address etc). I''m planning a fairly straightforward inheritance hierachy for these, where each different method inherits from something like a ContactMethod class. The only mention of ActiveRecord support for inheritance I can find in the Wiki and the Agile Web Dev book is STI. What''s not clear is whether STI is the *only* way that this will work. If I define my classes to have inheritance relationships and then create a separate table for e...
2006 Mar 16
9
Baffling AJAX issue
...it''s all correct and it does generate the correct html initially. The span element inside the div is what''s getting replaced. The remote call renders a string containing a span element with the toggled value and a css class reference to match: def toggle_contact_method cm = ContactMethod.find(params[:id]) cm.toggle(''active'') render_text "<span class=''#{cm.active}''>#{cm.active}</span>" end However, for some reason in the replacement an extra anchor tag is being generated. Original: <div id="contact_active_12&quot...