Sha256: ea2317d33a167a6c5e20d45e625d68310a2af176d3e99d33416f6c7a99c6482c

Contents?: true

Size: 375 Bytes

Versions: 10

Compression:

Stored size: 375 Bytes

Contents

module E9Polls
  #
  # Very simple module to alter the model_name.partial_path of E9Polls models
  #
  module Model
    extend ActiveSupport::Concern

    included do
      unless self.model_name.partial_path =~ /^e9_polls/
        self.model_name.instance_variable_set('@partial_path', File.join('e9_polls', self.model_name.partial_path).freeze)
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
e9_polls-1.0.10 lib/e9_polls/model.rb
e9_polls-1.0.9 lib/e9_polls/model.rb
e9_polls-1.0.8 lib/e9_polls/model.rb
e9_polls-1.0.7 lib/e9_polls/model.rb
e9_polls-1.0.6 lib/e9_polls/model.rb
e9_polls-1.0.5 lib/e9_polls/model.rb
e9_polls-1.0.4 lib/e9_polls/model.rb
e9_polls-1.0.3 lib/e9_polls/model.rb
e9_polls-1.0.2 lib/e9_polls/model.rb
e9_polls-1.0.1 lib/e9_polls/model.rb