lib/pubdraft.rb in pubdraft-0.0.1 vs lib/pubdraft.rb in pubdraft-0.0.2

- old
+ new

@@ -49,15 +49,19 @@ module HelperMethods def pubdraft_states_for_select [['Published', 'published'], ['Drafted', 'drafted']] end + + def pubdraft_state_options + options_for_select(pubdraft_states_for_select) + end end if defined?(ActiveRecord::Base) ActiveRecord::Base.extend Pubdraft::ClassMethods end - if defined?(ApplicationHelper) - ApplicationHelper.extend Pubdraft::HelperMethods + if defined?(ActionView::Base) + ActionView::Base.send(:include, Pubdraft::HelperMethods) end end