I'm working to add the FB Registration Plugin to my app. The way it works is the plugin posts one param, params["signed_request"] which then needs to be decoded by my app.
I found this tutorial: http://veerasundaravel.wordpress.com/2011/01/27/facebook-registration-plugin-in-rails/
My question is where wo开发者_JAVA技巧uld that module live? And I would I access it in the controller's def create method that recieves params["signed_request"] ?
Thanks
Create one ruby file inside the lib folder and put that module code inside that file. Next you have to autoload the module for that add the below line in config/application.rb
config.autoload_paths += %W(#{config.root}/lib)
restart the server. Now you can access that module inside controller.
精彩评论