Problem on the view

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem on the view

André Luiz Abdalla Silveira


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 [hidden email].
To post to this group, send email to [hidden email].
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.
Reply | Threaded
Open this post in threaded view
|

Re: Problem on the view

Hassan Schroeder-2
On Tue, Jan 2, 2018 at 2:24 PM, André Luiz Abdalla Silveira
<[hidden email]> 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 ------------------------ [hidden email]
twitter: @hassan
Consulting Availability : Silicon Valley or remote

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CACmC4yDLAcHwFynQg1odP%3DD%3DSWbjtr0YRBEZcuNeob3DSFQsUA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Problem on the view

radhames brito
In reply to this post by André Luiz Abdalla Silveira
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 <[hidden email]> 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 [hidden email].
To post to this group, send email to [hidden email].
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.

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CANkJ5gmvQ1_FFkkjs5BHNCD5Kf7DO8rbQryGmjDMTohENZ-_RQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Problem on the view

André Luiz Abdalla Silveira
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 <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="oVyQhm5AAwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">andrel...@...> wrote:

<a href="https://lh3.googleusercontent.com/-RITOWr1d0_A/WkwF2wli9YI/AAAAAAAAVLU/FszRmNlrSVg2kRqIWYScidwVAjG0VhSLwCLcBGAs/s1600/Captura%2Bde%2Btela%2Bde%2B2018-01-02%2B20%253A14%253A54.png" style="margin-left:1em;margin-right:1em" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://lh3.googleusercontent.com/-RITOWr1d0_A/WkwF2wli9YI/AAAAAAAAVLU/FszRmNlrSVg2kRqIWYScidwVAjG0VhSLwCLcBGAs/s1600/Captura%2Bde%2Btela%2Bde%2B2018-01-02%2B20%253A14%253A54.png&#39;;return true;" onclick="this.href=&#39;https://lh3.googleusercontent.com/-RITOWr1d0_A/WkwF2wli9YI/AAAAAAAAVLU/FszRmNlrSVg2kRqIWYScidwVAjG0VhSLwCLcBGAs/s1600/Captura%2Bde%2Btela%2Bde%2B2018-01-02%2B20%253A14%253A54.png&#39;;return true;">

<a href="https://lh3.googleusercontent.com/-iqRdfkCvPx0/WkwFwmhT3KI/AAAAAAAAVLQ/i7M-cZhG2fIfT24uh2-3QoffDty0ux4IgCLcBGAs/s1600/Captura%2Bde%2Btela%2Bde%2B2018-01-02%2B20%253A14%253A42.png" style="margin-left:1em;margin-right:1em" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://lh3.googleusercontent.com/-iqRdfkCvPx0/WkwFwmhT3KI/AAAAAAAAVLQ/i7M-cZhG2fIfT24uh2-3QoffDty0ux4IgCLcBGAs/s1600/Captura%2Bde%2Btela%2Bde%2B2018-01-02%2B20%253A14%253A42.png&#39;;return true;" onclick="this.href=&#39;https://lh3.googleusercontent.com/-iqRdfkCvPx0/WkwFwmhT3KI/AAAAAAAAVLQ/i7M-cZhG2fIfT24uh2-3QoffDty0ux4IgCLcBGAs/s1600/Captura%2Bde%2Btela%2Bde%2B2018-01-02%2B20%253A14%253A42.png&#39;;return true;">


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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="oVyQhm5AAwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">rubyonrails-ta...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="oVyQhm5AAwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">rubyonra...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/rubyonrails-talk/2cb07abc-3978-4d60-987f-a44c4b3544bc%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/rubyonrails-talk/2cb07abc-3978-4d60-987f-a44c4b3544bc%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/rubyonrails-talk/2cb07abc-3978-4d60-987f-a44c4b3544bc%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/rubyonrails-talk/2cb07abc-3978-4d60-987f-a44c4b3544bc%40googlegroups.com.

For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/25159d2f-06e4-41cb-85b7-44983cf10bd8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.