I have the feeling the class-names are bit mismatched. what is the
relation between Reductions::ConversionsByBucket and
Reductions::ImpressionsByBucket ?
Yeah I thought that too – but i have looked it over hundreds of times
and can’t find the mismatch. I have simplifed the classes to just
have the hello method. And still have the same behavior. Here are
the three classes
#app/models/reductions/impressions_by_hour.rb
class Reductions::ImpressionsByHour
def self.hello
“hello”
end
end
#app/models/reductions/conversions_by_hour.rb
class Reductions::ConversionsByHour
def self.hello
“hello”
end
end
#app/models/reductions/conversions_by_bucket.rb
class Reductions::ConversionsByBucket
def self.hello
“hello”
end
end
ls app/models/reductions/
base.rb conversions_by_bucket.rb
conversions_by_hour.rb impressions_by_hour.rb unions.rb
The relationship between the classes is that they all perform map/
reduce methods. base.rb holds common code between them
The AWS/SW gem overwrites Module#const_missing – and messes with
things if you class ends in ‘Bucket’. Man, that was a great use of 6
hrs. No idea why it only happens when coupled with
InheritedResources, but that clearly is the root of the problem.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.