This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Replace "app/controllers" for the kind of thing you are looking for | |
# A list of available items can be found in rails/railties/lib/rails/engine/configuration.rb#line39 | |
Rails.configuration.paths["app/controllers"].expanded.inject([]) do |controllers, dir| | |
controllers += Dir["#{dir}/**/*_controller.rb"].map do |file| | |
file.gsub("#{dir}/", "") | |
.gsub(".rb", "") | |
.camelize | |
.constantize | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** SELECT VALUES FOR SECTION 'Vanity Tops' AND FILTER 'AVAILABLE_COLORS' **/ | |
SELECT VALUE AS NAME, | |
VALUE AS VALUE, | |
Count(VALUE) AS COUNT | |
FROM (SELECT product_id, | |
VALUE, | |
position | |
FROM (SELECT pa.product_id AS product_id, | |
pa.position AS position, | |
Substr(pa.VALUE,Instr(pa.VALUE,'~') + 1,Length(pa.VALUE)) AS VALUE |
NewerOlder