hello, is there any way to "alias a bunch of constants" in a class, so I don't have to write top level namespace? Like class Foo; include MyTopLevel; attribute :something, MyNestedLevel; end;
anyone aware of the encoding returned by Net::IMAP::FetchData.attr["BODY"] (returns the full email)? I see in console it's returning utf-8, but it seems weird since internal charset might contain non-utf8 codes. I would have expected ASCII-8BIT or something along those lines
arahael: I might be ignorant but when you use BODY you are fetching the whole mail, so I'm talking before even starting the parsing of it
I've been digging through ruby net/imap source but it's hard to understand the encoding type of the string. It LOOKS like they overlooked entirely the encoded fact, but then there are some regexps whcih are for ascii-8bit. It feels like they work with ascii-8bit all time and then forgot to ensure it was encoded properly when sending it to the developer
hello, anyone with experience using net/imap can confirm that when fetching messages, the returned strings are always US-ASCII (which needs to be parsed later on)?
hello everyone, any solution for this rails autoloader mess? (this is not pseudocode, I actually created those files): https://gist.github.com/Fire-Dragon-DoL/46f03c6ce6b258910e4bc857e80043ea
opinion: would you run validations every time you save a record (even outside of a controller) or only within the controller?
mordof: I'm more concerned about the fact that we faced a bug because a record wasn't saved due to a rollback due to a validation error for something completely unrelated to the code
mhhh... How do I rebuild ActiveSupport::TimeWithZone from a JSON string? I have something like "2016-04-01T17:03:37.709Z"
meatchicken: ifyou didn't find it, check rspec-mocks documentation, there is allow(foo).to receive(:something).and_return(whatever), there are also test doubles and other stuff. It's more powerful than jasmine, really nice