I want to do something along the lines of Account.where(configuration_key: "au").map &:Store to get a list of stores based on a condition on the account, but map returns an array instead of an active record relation. Is there anyway to get an active record relation instead ?
Hey guys, quick question: I want to do a .where clause on an object, as well as check for the presence of a relation. So, I have say Person.where(Name: 'bob) and I also want to check that Person.family_member.sister exists for that person. What's the best way of doing this?
Could use a hand again :3 http://pastie.org/10574753 Getting a syntax error on line 10 saying it excepts a ':' I basically want to check if theres an existing file with this filename already before creating it