Page Menu
Home
GRNET
Search
Configure Global Search
Log In
Files
F905101
responders.rb
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Aug 29, 9:05 PM
Size
1 KB
Mime Type
text/x-ruby
Expires
Sun, Aug 31, 9:05 PM (8 h, 52 m)
Engine
blob
Format
Raw Data
Handle
252460
Attached To
rWEBDNS WebDNS (edet4)
responders.rb
View Options
require
'action_controller'
module
Responders
autoload
:FlashResponder
,
'responders/flash_responder'
autoload
:HttpCacheResponder
,
'responders/http_cache_responder'
autoload
:CollectionResponder
,
'responders/collection_responder'
autoload
:LocationResponder
,
'responders/location_responder'
require
'responders/controller_method'
class
Railtie
<
::
Rails
::
Railtie
config
.
responders
=
ActiveSupport
::
OrderedOptions
.
new
config
.
responders
.
flash_keys
=
[
:notice
,
:alert
]
config
.
responders
.
namespace_lookup
=
false
if
config
.
respond_to?
(
:app_generators
)
config
.
app_generators
.
scaffold_controller
=
:responders_controller
else
config
.
generators
.
scaffold_controller
=
:responders_controller
end
# Add load paths straight to I18n, so engines and application can overwrite it.
require
'active_support/i18n'
I18n
.
load_path
<<
File
.
expand_path
(
'../responders/locales/en.yml'
,
__FILE__
)
initializer
"responders.flash_responder"
do
|
app
|
Responders
::
FlashResponder
.
flash_keys
=
app
.
config
.
responders
.
flash_keys
Responders
::
FlashResponder
.
namespace_lookup
=
app
.
config
.
responders
.
namespace_lookup
end
end
end
Event Timeline
Log In to Comment