On 2 September 2010 21:41, proximal <lph.engelmann@gmail.com> wrote:
> I have a lot of elements form calling this method (and the method has
> to know which element is calling to react) so I wonder is it's
> possible to know this without having to pas a parameter.
So in several form_for method calls you call is_disabled as part of
building the parameters for the form_for, and you want is_disabled to
automatically know the symbol in the first param of the form_for? I
think it is unlikely that that is possible. Depending on how the Ruby
interpreter (if that is the right word) works, it may not even have
looked at the first parameter when it calls is_disabled (other than to
check the syntax). There may be some way but I doubt it.
Looking at it from another point of view, what is it that is (or
isn't) disabled? It seems like an odd method to be in a view helper.
By the way, please don't top post, it makes it difficult to follow the
thread. Thanks.
Colin
>
> On Sep 2, 10:15 pm, Colin Law <clan...@googlemail.com> wrote:
>> On 2 September 2010 20:17, proximal <lph.engelm...@gmail.com> wrote:
>
>> In what sense is :company calling the method? It is the view code
>> that is calling it.
>>
>> Colin
>
> --
> 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.
>
>
--
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.
No comments:
Post a Comment