Hey everyone. I''m new to ROR, and I followed and implemented the beginner Ruby On Rails Tutorial (2nd Edition) code, and its working great. For those who are unfamiliar, this creates a site that acts much like Twitter. If someone enter the hex value for a color (say #ff0000 for red), I would like for ROR to convert that to an HTML color box representation in the post that is created. Any ideas on how to accomplish this? Thanks in advance for the time and help. -- 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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/6b747e837528c79cb3a8ddbb0f6faace%40ruby-forum.com. For more options, visit https://groups.google.com/groups/opt_out.
On 7 July 2013 18:16, optimus 203 <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hey everyone. I''m new to ROR, and I followed and implemented the > beginner Ruby On Rails Tutorial (2nd Edition) code, and its working > great. For those who are unfamiliar, this creates a site that acts much > like Twitter. > > If someone enter the hex value for a color (say #ff0000 for red), I > would like for ROR to convert that to an HTML color box representation > in > the post that is created. Any ideas on how to accomplish this?Can you explain in a bit more detail what you want? I am not sure what you mean by converting #ff0000 to a colour box representation. Colin -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLuCozBUtLWha_s%2BCyt8HLPsSBQDL-Sk8AuyiDYC7a1%2B2Q%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Hey Colin. Thanks for trying to help me out. I mean that if someone enters #ff0000 into the microblog post and submits the post, a box with the color red will appear instead of the text #ff0000. Make sense? -- 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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/4b87319d2eb435ac0a016306d3df5974%40ruby-forum.com. For more options, visit https://groups.google.com/groups/opt_out.
On 7 July 2013 19:05, optimus 203 <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hey Colin. Thanks for trying to help me out. I mean that if someone > enters #ff0000 into the microblog post and submits the post, a box with > the color red will appear instead of the text #ff0000. Make sense?Please remember to quote the previous message as this is a mailing list not a forum (though you may be accessing it via a forum like interface). So you want to save the colour value in a field in the database and then on the next page displayed show something in that colour? Presumably you know how to save it in the database. Do you know how to control style (layout, colours etc) using CSS? If not then the first thing to do is to find some tutorials on CSS. Once you understand static styling then google for Rails Dynamic CSS to give you some ideas on how to make it dynamic. Colin -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLurrpfZLmLdSznc1m%2BnePEQRsqsN3qP8VqxU3fodQ5k_A%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.