Commit Graph

31 Commits

Author SHA1 Message Date
Pat Allan f39c6fd927 Add the frozen_string_literal pragma comment to all Ruby files. (#4725) 2017-12-21 15:36:29 -02:00
Griffin Smith 741df732dc Use `define_method`, not `class_eval`, for url_helpers
I'm not hugely familiar with ruby internals vis a vis sclass semantics,
but this *probably* serves as a workaround for the MRI thread-safety
bug mentioned in #3505.
Beyond that, and even if this doesn't fix the thread-safety issue, per
[this blog post][1], `define_method` is recommended over `class_eval`
for performance (and, fwiw, readability) reasons anyway.

[1]: http://tenderlovemaking.com/2013/03/03/dynamic_method_definitions.html
2015-05-12 15:05:31 -04:00
David Henry 1e8e8516f0 Simplify access to router_name using the existing scope lookup. 2014-05-05 23:19:03 +01:00
David Henry 1dd84a8244 Don't couple the routing object to the whole system.. pass around the RoutingDetails object instead.
NOTE: RoutingDetails is supposed to be a simple data transfer object.
2014-05-03 22:46:04 +01:00
David Henry 2dee54bc86 make the find_mapping! method return a mapping object 2014-05-03 22:41:32 +01:00
David Henry 23761aded2 Add find_mapping! method to return the router_name instead of overloading find_scope! 2014-05-03 22:37:21 +01:00
David Henry da49ed23f9 Start adding code to allow devise_for to specify the engine context (router_name) to be used. 2014-05-01 23:39:05 +01:00
José Valim 27a83f3dd3 Ensure Devise.available_router_name is never nil, closes #1648 2012-02-15 17:13:57 +01:00
José Valim a949f9eca2 FailureApp shuold always consider Devise.router_name, closes #1544 2012-01-03 20:32:51 +01:00
José Valim 897c1c684e Allow router_name to be customizable via Devise.router_name, useful for engines 2012-01-02 22:43:07 +01:00
José Valim fac02b58bc Another attempt to fix the misterious loading helpers bug. 2011-10-18 08:35:50 +02:00
José Valim 990dcc8eef Try to fix the misterious case where some url helpers are not defined. 2011-10-09 11:50:48 +02:00
José Valim 8796c1c601 Do not always skip helpers, instead provide :skip_helpers as option to trigger it manually 2011-08-31 12:02:57 +02:00
José Valim f21d05a235 Only generate helpers for the used mappings, closes #1288 2011-08-29 14:29:38 +02:00
José Valim bd8294aecf More OAuth setup. 2010-07-26 20:32:04 +02:00
José Valim 1c5d4771ff Initial work on making the authentication stack more flexible. 2010-03-29 16:13:19 +02:00
José Valim 2761a75437 Refactor on routes. 2010-02-08 20:25:20 +01:00
Carlos Antonio da Silva 60714cd449 autload Registerable. Extracting default routes and path_names to constants. Fix evals for better debugging and stack trace. 2010-02-04 20:09:53 -02:00
Carlos Antonio da Silva 6b837cb285 Introducing Registerable module, allowing users to sign up. 2010-02-04 20:08:38 -02:00
José Valim b4183cbaa2 Url helpers should rely find_scope! 2010-01-19 17:19:40 +01:00
Marcelo Silveira d2fa737aa0 introducing lockable implementation 2010-01-01 17:57:35 -02:00
José Valim dede8af5b0 Do not include Devise internal helpers in application controller. 2009-10-27 21:26:40 -02:00
José Valim 609a83a76c Allow to access the session for a given scope, through #{scope}_session reader and improved documentation. 2009-10-18 12:54:21 -02:00
Carlos A. da Silva b21b6291b0 Better documentation. 2009-10-17 12:10:15 -03:00
Carlos A. da Silva 0f174dbf4b Updating routes to use sign_in/sign_out instead of session. 2009-10-16 13:44:51 -03:00
José Valim b012bc800b Kick tests back to life. 2009-10-11 23:24:57 -03:00
José Valim bd8f7dc631 Some major changes. 2009-10-11 22:11:58 -03:00
Carlos A. da Silva 91a87eed2c Use signed_in instead of logged_in, and setup current_user to pass a scope. 2009-10-11 13:00:44 -03:00
Carlos A. da Silva 62bef5605a Adding filters generation based on devise mappings. 2009-10-11 08:15:48 -03:00
Carlos A. da Silva d181975555 Moving resource_name and resource_class to Devise, rewriting route tests, using resource_class in controllers. 2009-10-10 08:37:22 -03:00
Carlos A. da Silva f4de0f6c5a Creating Devise.map to generate and recognize urls based on scope. 2009-10-09 21:11:58 -03:00