[{"data":1,"prerenderedAt":177},["ShallowReactive",2],{"project-6750244":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":28,"sentiment":29,"stance_mix":30,"scored_comments":34,"aspects":35,"strip":39,"post_text":41,"what":42,"said":68,"maker_in_thread":109,"shape":117,"grid":121,"attempts":139,"same_week":140,"maker_shows":168,"maker_hidden":169,"reader_version":170,"card":171},"6750244","Filterer","A gem to stop progressively building ActiveRecord queries","title","Show HN: A gem to stop progressively building ActiveRecord queries","https:\u002F\u002Fgithub.com\u002Fdobtco\u002Ffilterer","github.com","5vforest",1384714740,2013,17,8,1054,1739,61,"shown","languages","ruby gem","library",[24,25,26,21,27],"activerecord","rails","query builder","scopes","mixed",0.095,{"positive":31,"neutral":31,"mixed":32,"critical":33},2,0,1,5,{"performance":36,"idea":37,"design":38},{"positive":32,"critical":33},{"positive":31,"critical":32},{"positive":32,"critical":32},[33,32,34,32,40,40,32,34],3,null,{"problem":43,"audience":49,"pricing":41,"motivation":41,"time_to_build":41,"stack":58,"openness":67,"stage":67,"team_size":67},{"value":44,"source":45,"evidence":46},"Progressively building ActiveRecord queries from user-selected filters","maker",[47],{"id":48},"post",{"value":50,"source":51,"evidence":52},"Rails developers filtering records by user-chosen criteria","inferred",[53,54],{"id":48},{"id":55,"by":56,"text":57},"6750890","seivan","It's basically a service object specifically built for scopes with its own DSL. I like it :) Correct me if I am wrong.",[59,63],{"value":60,"source":51,"evidence":61},"Ruby",[62],{"id":48},{"value":64,"source":51,"evidence":65},"Rails ActiveRecord",[66],{"id":48},"unknown",{"praise":69,"objections":79,"requests":87,"questions":88,"alternatives":96},[70],{"value":71,"source":72,"evidence":73},"Good idea, especially for filtering","commenter",[74,78],{"id":75,"by":76,"text":77},"6750486","troels","Nice. I've built something very similar in my current app. In my app it's called `SearchModel` and descendants live within the `app\u002Fmodels` dir. I include some modules from…",{"id":55,"by":56,"text":57},[80],{"value":81,"source":72,"evidence":82},"Indexing every column combination is impractical for large datasets",[83],{"id":84,"by":85,"text":86},"6750362","mikkelewis","While I think this is a good idea for smaller data sets, it just isn't feasible for larger data sets that require indices. Having every combination of columns as indices is just…",[],[89],{"value":90,"source":72,"evidence":91},"How does it differ from has_scope?",[92],{"id":93,"by":94,"text":95},"6750577","octernion","Differences with https:\u002F\u002Fgithub.com\u002Fplataformatec\u002Fhas_scope?",[97,101,105],{"value":98,"source":72,"evidence":99},"has_scope",[100],{"id":93,"by":94,"text":95},{"value":102,"source":72,"evidence":103},"ElasticSearch or Sphinx for faceting large datasets",[104],{"id":84,"by":85,"text":86},{"value":106,"source":72,"evidence":107},"Custom SearchModel with ActiveModel",[108],{"id":75,"by":76,"text":77},{"comments":31,"answered":33,"key":110},[111,114],{"id":112,"text":113},"6750698","Ah, that's neat. I usually just build these forms without the Rails helpers, using something like: ``` \u003Cform> \u003Cinput type='text' name='email' value='\u003C%= params[:email] %>' \u002F>…",{"id":115,"text":116},"6750688","Author here. Probably a matter of preference, to be honest. has_scope never really made much sense to me. If we're checking boxes, two features that Filterer has and has_scope…",{"commenters":118,"max_depth":40,"maker_replies":31,"first_comment_mins":119,"lifespan_hours":120},6,25,43,[122,124,128,130,132,135,137,138],[84,32,33,123,85,32],"project\u002Fcritical\u002Fperformance",[125,32,32,126,127,32],"6751280","commenter\u002Fneutral\u002Fnone","ctide",[75,33,34,129,76,32],"project\u002Fpositive\u002Fidea",[112,33,32,131,11,33],"maker\u002Fneutral\u002Fnone",[133,33,40,134,76,32],"6761023","project\u002Fneutral\u002Fdesign",[93,31,40,136,94,32],"project\u002Fneutral\u002Fidea",[115,31,32,136,11,33],[55,40,34,129,56,32],[],[141,146,150,155,160,164],{"id":142,"name":143,"points":144,"category":145},"6739074","Gitter",243,"dev_tools",{"id":147,"name":148,"points":149,"category":145},"6767883","DotNetFiddle",217,{"id":151,"name":152,"points":153,"category":154},"6754982","My new project",206,"consumer_social",{"id":156,"name":157,"points":158,"category":159},"6764962","Aberoth",178,"games",{"id":161,"name":162,"points":163,"category":159},"6749726","Asteroid Smash",165,{"id":165,"name":166,"points":167,"category":20},"6767681","Nil interpreter",115,4,false,"v2",{"id":172,"name":5,"line":6,"ai":169,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":173,"top":18,"kw":174,"maker":11,"domain":10,"tier":19,"attempts":32,"strip":175,"url":9,"mix":176,"praise":71,"objection":81,"sub":21},6750244,0.1,[24,25,26,21,27],"10503305",[31,31,32,33],1794036512249]