1
0
Fork 0
mirror of https://github.com/kbparagua/paloma synced 2023-03-27 23:21:17 -04:00

Bug Fix: Converting Rails controller name to singular form

This commit is contained in:
kbparagua 2013-10-31 16:07:55 +08:00
parent 77894fa744
commit 26658b5350
4 changed files with 10 additions and 5 deletions

View file

@ -1,5 +1,10 @@
# Changelog
## Version 3.0.2
* Bug Fix: Converting Rails controller name to singular form.
## Version 3.0.1
* Bug Fix: Can't handle Rails controller with Multi-word name.
* Bug Fix: Paloma Engine is halting when a warning is encountered.

View file

@ -35,7 +35,7 @@ module Paloma
# Keeps track of what Rails controller/action is executed.
#
def track_paloma_request
resource = controller_path.split('/').map(&:classify).join('/')
resource = controller_path.split('/').map(&:titleize).join('/').gsub(' ', '')
paloma_request = {:resource => resource,
:action => self.action_name}

View file

@ -86,8 +86,8 @@ Bar.prototype.show = function(){
var MultipleName = Paloma.controller('MultipleName');
var MultipleNames = Paloma.controller('MultipleNames');
MultipleName.prototype.index = function(){
window.called.push('MultipleName#index')
MultipleNames.prototype.index = function(){
window.called.push('MultipleNames#index')
};

View file

@ -63,7 +63,7 @@ feature 'executing Paloma controller', :js => true do
called = page.evaluate_script 'window.called.pop()'
expect(called).to eq 'MultipleName#index'
expect(called).to eq 'MultipleNames#index'
end
end