Back for some more help.

I added the following code to the model of the vehicle

class Vehicle < ActiveRecord::Base
  after_save :update_bit_ly_url

  def update_bit_ly_url
    bit_ly_url = CreateUri::bit_ly_for_vehicle(self.id)
    puts bit_ly_url
  end
end

had to change CreateUri. to CreateUri:: as it was not recognizing 
CreateUri.

maybe I have not written the class properly or have not included it in 
the correct manner.

Now this is the error i get.

NameError (uninitialized constant Vehicle::CreateUri):
  app/models/vehicle.rb:22:in `update_bit_ly_url'
  app/controllers/vehicles_controller.rb:46:in `create'

Any ideas?
-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.


Reply via email to