Ruby on Rails Saturday, September 4, 2010

On 3 September 2010 07:55, proximal <lph.engelmann@gmail.com> wrote:
> On Sep 2, 10:52 pm, Colin Law <clan...@googlemail.com> wrote:
>
>> 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.
>
> Thank you for your reply. I will use a paramater as I thought at the
> first time.
>
> What about your second remark : my method "is_disabled" is located in
> the view helper and takes care to enable / disable the input element
> regarding the rights of the current user.

I retract my comment, that use is fine.

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.

No comments:

Post a Comment