helper_method :calendar
Is what you want.
On Jan 19, 2013 6:44 PM, "Pierre-Andre M." <li...@ruby-forum.com> wrote:

> I have a trivial question:
>
> if i have defined something in my controller, like
>
> def calendar
>     my_time = Time.now
>
>   end
>
> how do I use that variable in my view?
>
> I tried <%= my_time %>
>
> But that simply returns an error.
>
> Thanks
>
> --
> 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@googlegroups.com.
> To unsubscribe from this group, send email to
> rubyonrails-talk+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to