I tried: module ApplicationHelper alias_method :orig_text_area, :text_area def text_area variable, attribute, options={} options[:cols] ||= 30 options[:rows] ||= 8 orig_text_area(variable, attribute, options) end end But it doesn''t do anything. What''s the correct way? (And doesn''t answer "CSS", I still want to know how to do aliases) -- 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 -~----------~----~----~----~------~----~------~--~---
Elliot Temple wrote:> I tried: > > module ApplicationHelper > alias_method :orig_text_area, :text_area > def text_area variable, attribute, options={} > options[:cols] ||= 30 > options[:rows] ||= 8 > orig_text_area(variable, attribute, options) > end > end > > But it doesn''t do anything. What''s the correct way? > > (And doesn''t answer "CSS", I still want to know how to do aliases)I figured it out, I think. I put a file in lib and required it in environment.rb. it has: module ActionView module Helpers module FormHelper alias_method :orig_text_area, :text_area def text_area variable, attribute, options={} options[:cols] ||= 30 options[:rows] ||= 8 orig_text_area(variable, attribute, options) end end end end -- 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 -~----------~----~----~----~------~----~------~--~---
Elliot Temple wrote:> module ActionView > module Helpers > module FormHelper > alias_method :orig_text_area, :text_area > def text_area variable, attribute, options={} > options[:cols] ||= 30 > options[:rows] ||= 8 > orig_text_area(variable, attribute, options) > end > end > end > endKind of off topic but you use CSS do accomplish that same task without any extra html markup. -- 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 -~----------~----~----~----~------~----~------~--~---