Added one more feature to plugin. Imagine the following case:
end
See that all actions :new will be replaced by ‘novo’, but this does not fit properly in resource :casas, which would correct be ‘nova’ and not ‘novo’ (is just one example).
In this case we can use the option :actions_as in the resources, like this:
map.resources :houses, :actions_as => {:new => 'nova'}
Problem solved. In all other cases the action :new will be called ‘novo’, but only in the resource :casas it will be ‘nova’.
In addition we also have the option :as those who do the same thing with the name of the resource.
To understand how to install and use this plugin, click here.
If the plugin is being useful to you, be sure to recommend me in working with rails.
2 Comentários em "New feature in Custom Resource Name Plugin"
This feature is great, and now that I changed the code generated by restful authentication for your plugin work properly, this new feature will be important for use on routes such as “formas de pagamento” with the :action_as => nova.
Sincerely,
Vinícius Ebersol
[...] propósito, o Carlos tem melhorado dia após dia o seu plugin. Novos recursos foram adicionados recentemente, o que me possibilitou ter nenhuma dor de cabeça [...]
Deixe o seu comentário!