Sunday, September 19, 2010

[Rails] Re: How to access a model method from within a view?

On Sep 19, 3:11 pm, Abder-Rahman Ali <li...@ruby-forum.com> wrote:
> radhames brito wrote:
> > show the code where you are trying to access, ill see whats wrong with
> > it
>
> Thanks @radhames.
>
> The main issue is how to make a call to the height() and width() methods
> in the model in this line in "show.html.erb":
>
> <canvas id="draw" height = "?????" width= "?????">
> </canvas>

What's wrong with <%= some_object.width %> ?

Fred

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate