Problem on the view

16 visualizzazioni
Passa al primo messaggio da leggere

André Luiz Abdalla Silveira

da leggere,
2 gen 2018, 17:24:3602/01/18
a Ruby on Rails: Talk


Hi folks, Happy new year

I'm having problems buillding my views, can you help me? I want every team to be printed with different colors, and so I created a migration to include these fields

Hassan Schroeder

da leggere,
2 gen 2018, 17:45:1302/01/18
a rubyonrails-talk
On Tue, Jan 2, 2018 at 2:24 PM, André Luiz Abdalla Silveira
<andrel...@gmail.com> wrote:

> I'm having problems buillding my views, can you help me? I want every team
> to be printed with different colors, and so I created a migration to include
> these fields

The problem is exactly as stated in the error message: you've added
attributes to Team but you're trying to access "color1" as an attribute
of a String (the team name).

--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote

radhames brito

da leggere,
3 gen 2018, 09:25:0903/01/18
a Ruby on Rails: Talk
You have `partida.away` that returns a string, string does not have the method `color1` I think you want to do, `partida.color1`. You error is that you have `partida.away.color1`, its the same as saying `'Colorado Rockies'.color1` which makes no sense.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/2cb07abc-3978-4d60-987f-a44c4b3544bc%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

André Luiz Abdalla Silveira

da leggere,
4 gen 2018, 06:28:3204/01/18
a Ruby on Rails: Talk
Shame on me, lol. Thank you folks. Really appreciate your help


Em quarta-feira, 3 de janeiro de 2018 12:25:09 UTC-2, radhames brito escreveu:
You have `partida.away` that returns a string, string does not have the method `color1` I think you want to do, `partida.color1`. You error is that you have `partida.away.color1`, its the same as saying `'Colorado Rockies'.color1` which makes no sense.
On Tue, Jan 2, 2018 at 6:24 PM, André Luiz Abdalla Silveira <andrel...@gmail.com> wrote:


Hi folks, Happy new year

I'm having problems buillding my views, can you help me? I want every team to be printed with different colors, and so I created a migration to include these fields

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
Rispondi a tutti
Rispondi all'autore
Inoltra
0 nuovi messaggi