Skip to content

Commit

Permalink
Ensure attribute accessors are public.
Browse files Browse the repository at this point in the history
In Ruby 1.9, the accessors were protected since #attribute itself is
protected.
  • Loading branch information
oggy committed Dec 30, 2011
1 parent d405a3f commit 0749145
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/mail_form/dsl.rb
Expand Up @@ -42,6 +42,8 @@ def attribute(*accessors)
options = accessors.extract_options!

attr_accessor *accessors
public *accessors
public *accessors.map{|s| "#{s}="}

if options[:attachment]
write_inheritable_array(:form_attachments, accessors)
Expand Down

0 comments on commit 0749145

Please sign in to comment.