[Rails] Re: how to scope the /auth/:provider/callback , using OmniAuth for users and members

2012-10-07 Thread Erwin
[SOLVED] maybe not the best way, but it runs .. using only one callback url, I can test the request.env[omniauth.origin] which can be tested : http://lvh.me:3000/en/users/sign_in; or http://acme.lvh.me:3000/en/members/sign_in; ( in this cas I can even test for current_subdomain.nil? On 6

[Rails] routing issue, matching a param as action

2012-10-07 Thread Erwin
I have the following routes : match '/auth/:provider/callback', to: 'omniauth_callbacks#create' I can test the :provider in the create action .. is there any way to directly match to an action with the :provider name ? match '/auth/:provider/callback', to: 'omniauth_callbacks#(:provider)'

Re: [Rails] paperclip gem question.

2012-10-07 Thread BalaRaju Vankala
Hi... 1. in Gemfile add this gem gem paperclip, 3.1.4 2. bundle install 3.after creating model add below code in migration file(db-migrate-photo model migration file ) t.attachment:photo 4. rake db:migrate 5. in your model Add this code attr_accessible: photo has_attached_file :photo

[Rails] Re: [ANN] Jail : Put all your Assets in Rails !

2012-10-07 Thread Charly
Quick note to say the cdnjs libraries have been integrated to the Jail gemhttps://github.com/charly/jail(version 0.1.1). That's a whooping 158 more javascriptshttps://github.com/cdnjs/cdnjs/tree/master/ajax/libs . On Wednesday, October 3, 2012 9:41:40 AM UTC+2, Charly wrote: Copying,

Re: [Rails] Rails with Phusion Passenger and Apache

2012-10-07 Thread Mandeep Kaur
On Mon, Oct 1, 2012 at 7:51 PM, Jordon Bedwell envyge...@gmail.com wrote: snip Yes, Capistrano can be setup to do whatever you want, including provisioning servers, though personally I prefer to deploy to a central server via Git then that server is designed to deploy, manage, I have tried it

Re: [Rails] Rails with Phusion Passenger and Apache

2012-10-07 Thread Hassan Schroeder
On Sun, Oct 7, 2012 at 6:00 AM, Mandeep Kaur meghasi...@gmail.com wrote: ** transaction: start * executing `deploy:update_code' Please specify the repository that houses your application's code, set :repository, 'foo' Have you tried doing what the error message tells you to do? At least,

Re: [Rails] Rails with Phusion Passenger and Apache

2012-10-07 Thread Mandeep Kaur
On Sun, Oct 7, 2012 at 6:55 PM, Hassan Schroeder hassan.schroe...@gmail.com wrote: On Sun, Oct 7, 2012 at 6:00 AM, Mandeep Kaur meghasi...@gmail.com wrote: ** transaction: start * executing `deploy:update_code' Please specify the repository that houses your application's code, set

Re: [Rails] Rails with Phusion Passenger and Apache

2012-10-07 Thread Mandeep Kaur
On Sun, Oct 7, 2012 at 7:11 PM, Mandeep Kaur meghasi...@gmail.com wrote: Here i have confusion about repository. Its github repository or something else? I have solved this but getting anther error. Check this ** [deploy:update_code] exception while rolling back:

Re: [Rails] Rails with Phusion Passenger and Apache

2012-10-07 Thread Hassan Schroeder
On Sun, Oct 7, 2012 at 6:41 AM, Mandeep Kaur meghasi...@gmail.com wrote: Here i have confusion about repository. Its github repository or something else? It's the repository for your code. -- Hassan Schroeder hassan.schroe...@gmail.com

Re: [Rails] Rails with Phusion Passenger and Apache

2012-10-07 Thread Mandeep Kaur
On Sun, Oct 7, 2012 at 7:46 PM, Hassan Schroeder hassan.schroe...@gmail.com wrote: On Sun, Oct 7, 2012 at 6:41 AM, Mandeep Kaur meghasi...@gmail.com wrote: Here i have confusion about repository. Its github repository or something else? It's the repository for your code. Done! This is

Re: [Rails] Rails with Phusion Passenger and Apache

2012-10-07 Thread Hassan Schroeder
On Sun, Oct 7, 2012 at 7:20 AM, Mandeep Kaur meghasi...@gmail.com wrote: ** [deploy:update_code] exception while rolling back: Capistrano::ConnectionError, connection failed for: mandeep (Net::SSH::AuthenticationFailed: mandy) How to solve this? Ideally, install your ssh keys on your server

[Rails] Re: routing issue, matching a param as action

2012-10-07 Thread Erwin
It seems in some cases I can use the redirect match '/auth/:provider/callback', :to = redirect {|params| / omniauth_callbacks/#{params[:provider]} } but not in this case , as the redirect will change the request , and I'll not be able to check for request.env[omniauth.auth] so I resolved

Re: [Rails] Rails with Phusion Passenger and Apache

2012-10-07 Thread Mandeep Kaur
On Sun, Oct 7, 2012 at 8:06 PM, Hassan Schroeder hassan.schroe...@gmail.com wrote: On Sun, Oct 7, 2012 at 7:20 AM, Mandeep Kaur meghasi...@gmail.com wrote: ** [deploy:update_code] exception while rolling back: Capistrano::ConnectionError, connection failed for: mandeep

Re: [Rails] Rails with Phusion Passenger and Apache

2012-10-07 Thread Norbert Melzer
2012/10/7 Mandeep Kaur meghasi...@gmail.com: Not getting. Not getting what? What did you expect to get, and what are you getting instead? Doesn't work or similar are the worst descriptions of an error or missbehaviour I am aware off. We can only help you, if you give appropriate reports or

Re: [Rails] Not Selected-dropdown-list-option

2012-10-07 Thread Walter Lee Davis
On Oct 6, 2012, at 4:47 PM, DONEIN NET wrote: I am having a similar issue. I figured out to add a blank item to the top of the list. But then when I go back in to edit mode, it gets upset because it doesn't exist in the collection. Have a look at the :prompt option for the select and

Re: [Rails] Re: routing issue, matching a param as action

2012-10-07 Thread Ignacio Piantanida
You could do something like this: match '/auth/:provider/callback', to: 'omniauth_callbacks#all_callbacks' class OmniauthCallbacksController def all_callbacks send(params[:provider]) end def facebook end def twitter ... end def method_missing(method_name, *args,

[Rails] dup/clone and taintedness

2012-10-07 Thread John Merlino
I was reading this: these methods allocate a new instance of the class of the object on which they are invoked. They then copy all the instance variables and the taintedness of the receiver object to the newly allocated object. What does it mean taintedness? thanks for response -- You