class Person < ActiveRecord::Base
attr_accessible :photo, :name
has_many :photos, :as => :attachment, :dependent => :destroy
# I would do this. This will save a portrait_id on a person object,
which is the id of a photo. This is most efficient because if you put the
"belongs_to" associ
Why are you doing
b = A.find("b-id") and not b = B.find("b-id") ?
I think it would be better if you did
b = B.find("b-id")
c = b.becomes(C)
try it in the console and verify that c.class is C
then you should be able to do
c.update_attributes(:attribute_x => 'present', :attribute_y => 'present')
You might want to keep your eye out for Rails 4, in particular for what
Aaron presents here:
http://www.confreaks.com/videos/1291-rubyconf2012-real-time-salami
-- start watching at 15:00, with a demo at 22:00
On Tuesday, January 15, 2013 3:38:21 AM UTC-5, Dheeraj Kumar wrote:
>
> You can run F
3 matches
Mail list logo