Thanks. I will work up a pull request and see if I can get it added.
On Mon, Dec 16, 2013 at 11:37 AM, Amiel Martin <am...@carnesmedia.com>wrote: > I like this idea and would use it. > > -Amiel > > http://carnesmedia.com > > > On Fri, Dec 13, 2013 at 2:44 PM, Scott Johnson <7.scot...@gmail.com>wrote: > >> I find I often use delegate and many nil guards in my facades. Adding a >> default_value option to delegate would simplify this, but I am interested >> how others feel about it. >> >> Implementation would look something like: >> >> class PersonFacade >> delegate :name, :to => :person, :default_value => "" >> >> def initialize(person) >> @person = person >> end >> >> end >> >> >> p = Person.find >> p.name => nil >> >> f = PersonFacade.new(p) >> f.name => "" >> >> >> -- >> Scott Johnson >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Core" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to rubyonrails-core+unsubscr...@googlegroups.com. >> To post to this group, send email to rubyonrails-core@googlegroups.com. >> Visit this group at http://groups.google.com/group/rubyonrails-core. >> 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: Core" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to rubyonrails-core+unsubscr...@googlegroups.com. > To post to this group, send email to rubyonrails-core@googlegroups.com. > Visit this group at http://groups.google.com/group/rubyonrails-core. > For more options, visit https://groups.google.com/groups/opt_out. > -- Scott Johnson -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-core+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-core@googlegroups.com. Visit this group at http://groups.google.com/group/rubyonrails-core. For more options, visit https://groups.google.com/groups/opt_out.