Evaluating session variables inside a markaby paragraph tag always returns false. For example welcome.mab -- p "Good morning Mr. #{session[:user]}." -- displays: Good mornig Mr. How can I access session variables in maraby? -- Best Regards, -Larry "Work, work, work...there is no satisfactory alternative." --- E.Taft Benson -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060628/bac6d9c3/attachment.html
Jamie Orchard-Hays
2006-Jun-28 14:16 UTC
[Rails] [markaby] Trouble accessing session values.
try #{helpers.session[:user]} I think that''s the proper syntax. On Jun 28, 2006, at 10:12 AM, Larry Kelly wrote:> Evaluating session variables inside a markaby paragraph tag always > returns false. For example > > welcome.mab > -- > p "Good morning Mr. #{session[:user]}." > > -- > displays: > Good mornig Mr. > > How can I access session variables in maraby?
Yes, that worked! I''m a happy coder, again :) One nagging question remain, though. How can I tell when to use the ''helpers.* syntax? -Larry On 6/28/06, Jamie Orchard-Hays <jamie@dang.com> wrote:> > try #{helpers.session[:user]} > > I think that''s the proper syntax. > > > On Jun 28, 2006, at 10:12 AM, Larry Kelly wrote: > > > Evaluating session variables inside a markaby paragraph tag always > > returns false. For example > > > > welcome.mab > > -- > > p "Good morning Mr. #{session[:user]}." > > > > -- > > displays: > > Good mornig Mr. > > > > How can I access session variables in maraby? > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Best Regards, -Larry "Work, work, work...there is no satisfactory alternative." --- E.Taft Benson -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060628/c167757f/attachment-0001.html
Jamie Orchard-Hays
2006-Jun-28 14:58 UTC
[Rails] [markaby] Trouble accessing session values.
I''m not actively using Markaby yet, though I''m about to. So, I''m not much of an authority. ;-) There''s some info on the redhanded website. If you google it, you''ll find some info. I think the api docs are decent as well. Jamie On Jun 28, 2006, at 10:26 AM, Larry Kelly wrote:> Yes, that worked! I''m a happy coder, again :) > > One nagging question remain, though. How can I tell when to use > the ''helpers.* syntax? > -Larry
Larry Kelly wrote:> Evaluating session variables inside a markaby paragraph tag always > returns > false. For example > > welcome.mab > -- > p "Good morning Mr. #{session[:user]}." > > -- > displays: > Good mornig Mr. > > How can I access session variables in maraby?Fixed by patch in Markaby ticket 51 http://code.whytheluckystiff.net/markaby/ticket/51 which allows session[] and params[] to be accessed without any qualifiers (just like the other helpers). I verified this patch on Rails 1.2.1, Ruby 1,8.5, Markaby 0.5. -- 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 post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---