Doubts regarding image,name and description in Exe5 Show a Tag


When we iterate through @destinations we use x.image, and x.descriptions.Are name, image and descriptions variables we created in this particular project (I don't remember doing it :confused:) or rails creates them for any kind of models.


Hi @mad_orange,

*.name, *.description, etc., are from the model we created. In db/migrate/date_model_name.rb. In that file, we set t.string :name, thus letting us access the variable (assuming @destination is a variable containing a DB record).

Does that help? :slight_smile:


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.