Is there a simple way to search query based on an association value / array? Example Product.where(colors: [list,of,color,objects]) would find all products with any colors searched for...?
so that should work on association collections too I'm guessing - will test
maybe I'm not understanding but it does not seem to work with associations example Product has_many Categories - query products within categories does not work Product.where(categories: [1,2,5])
Is there a better way to model a “Location” that would have multiple price fields (1 passenger: $5, 2 passenger: $15… up to 6) or just have one Location model with 6 price fields? https://gist.github.com/anonymous/f60f2930f7c6224761cad0d7c17926be
fryguy: Thanks for suggestion. environment.rb is empty / default. But adding perform_deliveries = false inside development.rb appears to made it work! Similar to this answer https://stackoverflow.com/a/30825093
hmm I have development environment config.action_mailer.delivery_method :test (restarted server) but it fails with “Connection refused” and is trying to send mail to localhost:25 - the :test method should just log mails to the console?
Hmm with a regex how can I target \r\n ? According to this tool it’s not /\r\n/ - for example I basically want to remove everything except ‘text to keep’ in this example http://rubular.com/r/2mGWKIUGTO
Hmm trying to add seed / test data to my db but keep getting undefined method delete_all for 100:Fixnum... I don't want to delete any data though I just want to add some customer records using Populate / Faker ( example seeds.rb file: https://gist.github.com/anonymous/06df9b84f42554248f8b939cf3ceeba5 ) I must be misunderstanding something...?
Ok think I figured it out - just don't use Populator and do 100.times do etc.
cgibsonmm: Just guessing... Maye something with date formatting? No errors in logs? Maybe this is relevant http://stackoverflow.com/questions/13231629/working-with-group-by-on-a-created-at-field-in-ruby-on-rails