[Rails] Re: Token authenctication

2014-09-04 Thread Matt Jones
On Wednesday, 3 September 2014 14:41:30 UTC-4, Sander Obdeijn wrote: Hi all, i'm building my first project in RoR. And i'm now looking into authentication. A lot of the posts online recommended devise so i'm looking into that. I require authentication in a html website and a json api and

[Rails] Re: Redirect to same server with different port

2014-09-04 Thread Matt Jones
On Wednesday, 3 September 2014 11:07:53 UTC-4, Ruby-Forum.com User wrote: I'm trying to set up a route to redirect to my monit interface, but I'm not sure how to do it. what I'd like is my https://domain.com:3000/monit to redirect to http://domain.com:2812 . I tried: get /monit =

Re: [Rails] Token authenctication

2014-09-04 Thread Jason Fleetwood-Boldt
I think you can implement that yourself along with Devise. Since you get so much with devise I would do that if it were me. last time I discussed this with business people, the need for the token auth outweighed the security considerations. We ameliorated this by 1) Making the token expire

[Rails] What is best way to define AR scope for this?

2014-09-04 Thread Michael Bostler
Hi all, Say I have an article class that has one main tag, but can also be associated with multiple secondary tags. Something like schema listed below. How can I implement the scope method below? Basically I want one method where I can return ALL articles related to a tag, regardless of

Re: [Rails] What is best way to define AR scope for this?

2014-09-04 Thread Colin Law
On 4 September 2014 18:45, Michael Bostler li...@ruby-forum.com wrote: Hi all, Say I have an article class that has one main tag, but can also be associated with multiple secondary tags. Something like schema listed below. How can I implement the scope method below? Basically I want one

Re: [Rails] What is best way to define AR scope for this?

2014-09-04 Thread Jason Fleetwood-Boldt
Yes, I'd agree with what Colin wrote. Generally when you try to have one thing join via a join table ( has many through) and the same set of data also join via a belongs_to you get headaches because you're going a bit against the grain of AR. You could still implement top-level methods to do

Re: [Rails] Token authenctication

2014-09-04 Thread Sander Obdeijn
No only my own private 'au natural' pictures will be hosted. I'm looking a the gem, but i can't find how to request a token after you have implemented it. Is there more documention about using the token authentication? Op donderdag 4 september 2014 17:20:05 UTC+2 schreef Jason FB: I think

Re: [Rails] Token authenctication

2014-09-04 Thread Emil S
Sander, devise( https://github.com/plataformatec/devise ) + doorkeeper( https://github.com/doorkeeper-gem/doorkeeper ) may work well for your case. Doorkeeper is based on OAuth specs which is pretty solid for token based auth. A google search involving both the gems would give you enough material

Re: [Rails] How to use a variable in several controllers?

2014-09-04 Thread António
Hi Colin, Thanks for your answer, The variable @session is a variable I created to store the user id of a user when the user logs in. The second controller checks the variable for knowing whether a user is logged in. The idea is the @session variable to be a global variable of the

Re: [Rails] How to use a variable in several controllers?

2014-09-04 Thread Colin Law
On 4 September 2014 21:38, António ajd...@gmail.com wrote: Hi Colin, Thanks for your answer, The variable @session is a variable I created to store the user id of a user when the user logs in. The second controller checks the variable for knowing whether a user is logged in. The idea

[Rails] Re: What is best way to define AR scope for this?

2014-09-04 Thread Michael Bostler
I see what you mean. Very very helpful. Thanks both so much for the timely reply! I think I will go with what you are suggesting and use the boolean flag on the join table. Still open to other answers if there are any for sake of curiosity, and I will add comment if I come across anything

[Rails] JOB OPPORTUNITY

2014-09-04 Thread Garrett Berman
I have 2 Consulting and one Permanent position for Ruby Engineers in the Chicago Area. These are immediately available and range from 120-200k please send me an email with your resume and contact number to gber...@skybridgeresources.com -- You received this message because you are subscribed