From james.britt at gmail.com Sun Dec 2 13:02:07 2007 From: james.britt at gmail.com (James Britt) Date: Sun, 2 Dec 2007 10:02:07 -0800 (PST) Subject: [Rg 114] Changing my subscription option Message-ID: <0ceb2310-010c-4c89-a126-2f49c414eec8@s36g2000prg.googlegroups.com> For some reason, when I joined this group, I was not allowed to pick the option of having all messages sent to me. The best I could do was get the abridged mail When I select the full-mail choice, I get this: "There is a problem with your choice of subscription type" But no details. Can someone with admin rights change my membership so that I get sent new messages as they arrive? Thanks, James From lasso at lassoweb.se Wed Dec 12 14:49:56 2007 From: lasso at lassoweb.se (Lars Olsson) Date: Wed, 12 Dec 2007 20:49:56 +0100 Subject: [Rg 115] Transferring data from a controller to a template Message-ID: <47603B64.4010606@lassoweb.se> Hi list! I find it somewhat strange that only the instance variables of a controller are available to the templates that get rendered by the very same controller. This may of course be by design, but it would be nice if somebody could explain why the class variables and constants of the controller should be left out. A small example: Lets say we have the following Controller. The controller does not use any templates at all. class TestController < Ramaze::Controller FOO = 'I am the constant FOO.' def initialize @@bar = 'I am the class variable @@bar.' @baz = 'I am the instance variable @baz.' end def index # Nothing to see here, move along... end def test_const_val() FOO end def test_class_var() @@bar end def test_instance_var() @baz end end Now, if we start Ramaze, we can visit all pages without any problems. All constants, class variables and instance variables gets printed correctly. Lets add some templates: [test_class_var.xhtml] #{@@bar} [test_const_val.xhtml] #{FOO} [test_instance_var.xhtml] #{@baz} All of a sudden the pages that are displaying the constant and the class variable stop working. Ramaze complains that Ramaze::Action doesn't know of FOO and @@bar. This seems a little strange to me...Is there any reason why class variables and constants available to the controller shouldn't be available to the template as well? Sincerely /lasso -- ________________________________________ Lars Olsson lasso at lassoweb.se http://www.lassoweb.se/ From jesuswasramazing.10.pistos at geoshell.com Wed Dec 12 23:31:23 2007 From: jesuswasramazing.10.pistos at geoshell.com (jesuswasramazing.10.pistos at geoshell.com) Date: Wed, 12 Dec 2007 23:31:23 -0500 Subject: [Rg 116] Re: Transferring data from a controller to a template In-Reply-To: <47603B64.4010606@lassoweb.se> References: <47603B64.4010606@lassoweb.se> Message-ID: <6c9d9ef0712122031m4d769b12he43c1e7728bec36f@mail.gmail.com> On 12/12/2007, Lars Olsson - lasso at lassoweb.se <+jesuswasramazing+pistos+b37b175164.lasso#lassoweb.se at spamgourmet.com> wrote: > All of a sudden the pages that are displaying the constant and the class > variable stop working. Ramaze complains that Ramaze::Action doesn't know > of FOO and @@bar. This seems a little strange to me...Is there any > reason why class variables and constants available to the controller > shouldn't be available to the template as well? I don't know about class variables, but I am able to reference constants in my templates by fully qualifying them: TestController::FOO. Pistos -- http://blog.purepistos.net