RailsCasts Pro episodes are now free!

Learn more or hide this

Stefan Mielke's Profile

GitHub User: caplod

Site: tan3.de

Comments by Stefan Mielke

Avatar

what if you have validations on the associated model?

in the model i have

ruby
  def spot_name=(name)
    self.spot = Spot.find_or_create_by_name(name, :address => name) if name.present?
  end

and a geocoder like in episode #273 attached to spot.
when i have a spot_name that i cannot geocode i want the form to display the error but how do i do that?