Re: [Rails] Devise Admin View password

2013-01-07 Thread Jérémie Horhant
Here it is, the huge security hole... Mails are sent in clear text and virtually anyone can read it. I suggest you to generate a random password when an admin create a sub user. Then in the same time send it by mail with obligation to change it when the user login Or the simplest solution, genera

Re: [Rails] Devise Admin View password

2013-01-06 Thread Jérémie Horhant
Hi, With Devise vanilla config it's not possible. You should look to custom encryptor (https://github.com/plataformatec/devise/wiki/How-To:-Create-a-custom-encryptor) with reversible encryption. But you should really don't do that, it's a security breach and client private life violation. As a sys

[Rails] Rails 3.1 : Complex database query with Arel 2

2011-06-04 Thread Jérémie Horhant
Hi, I've search for documentations on queries with Arel 2 but there is pretty nothing and all I've found is for Arel 1 so I've run into NoMethodError: undefined method `[]' for # errors with join syntax. My query is barely simple but involve nesting queries. I have 4 tables. Assets, Deposits, Ord

[Rails] Searching ActiveFoo

2009-12-03 Thread Jérémie Horhant
Hello, Activerecord is reading data from database and Activeresource is reading data from xml requests. But is there any class similar to the previous ones (with validation, errors support, form_for support, ...) for reading/writing data from arbitrary sources (maybe yaml or whatever) ? Thanks T

[Rails] XHTML mime type

2009-11-27 Thread Jérémie Horhant
Hello, I'm trying to insert inline SVG in my XHTML pages but I realized that rails serves XHTML pages with content-type header set to "text/html; charset=utf-8". It's definitely not cool and it should be "application/xhtml+xml, charset=utf-8". So I've added a mime type line in initializer :