Displaying 20 results from an estimated 200 matches similar to: "Import friends"
2012 May 01
1
uninitialized constant LoginController in Ruby
This is my environment.rb
# Load the rails application
require File.expand_path(''../application'', __FILE__)
# Initialize the rails application
Qstack::Application.initialize!
require ''koala''
This is my application_controller.rb
class ApplicationController < ActionController::Base
# protect_from_forgery
before_filter :parse_facebook_cookies
def
2011 Sep 19
7
how to get instance variables in another action in rails 3
In my controller show method i have two instance variables which have
large amount of data and take much time to fetch from remote system.
shown below
def show
@graph = Koala::Facebook::GraphAPI.new(session[:fbuser]
["credentials"]["token"])
@friends = @graph.get_connections("me", "friends")
@friends =@friends.to_a
end
in the same controller I
2013 Oct 07
3
Get current url
Hi friends,
i need current url in rails environment file.
i can get current url in conroller by the below command.
request.env[''HTTP_HOST'']
and now i want get current url in environment.rb file or intializer folder
files
Regards,
Daya.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from
2006 Jan 06
2
Re: Some advice on DB modeling
I have more or less the same problem. I''m trying to build a system where
users can enter their friends. But the solutions seems not to work for me.
I used same sql:
CREATE TABLE `friends` (
`user_id` int(11) NOT NULL default ''0'',
`friend_id` int(11) NOT NULL default ''0'',
KEY `user_id` (`user_id`),
KEY `friend_id` (`friend_id`),
2013 Nov 08
2
Export CSV
Hi friends,
i am using csv export on my application. in my view file code is
<%- headers = ["Transaction ID", "Activity ID", "Product Name","Customer
Name", "Ticket code"] -%>
<%= CSV.generate_line(headers).strip %>
<%if !@trans.nil? && @trans.length > 0 %>
<% @trans.each do |tran|%>
<% if
2006 Mar 25
0
Self-Referential Many-To-Many relationships where the relationship itself has data.
Trying to model a bunch of users that have friends that are other
users. clearly a job for has_and_belongs_to_many, but the trick is,
they have ratings for their friends. I have gone through the Rails
Recipes book, and it seems like I''m trying to combine the
self-referential many-to-many recipe (12) and the many to many
relationships where the relationship itself has data recipe (16). So
2010 Sep 17
0
ruby's oauth2 grant_type
Hi, i started using oauth2 gem by intridea
(http://github.com/intridea/oauth2) and don''t know how to fix this
problem. I have developed both client and server and on request for
access_token i see no grant_type parameter. My code from client callback
controller
class CallbackController < Devise::OauthCallbacksController
def accounts
access_token =
2006 May 28
7
Self-referential has_many :through relationship
Hi,
I have a self-referential has_many :through relationship setup to
track relationships between users. Basically relationships are
modeled as a join table with an extra column ''relation''.
create table relationships (
user_id integer unsigned not null,
friend_id integer unsigned not null,
relation char(1) not null,
)
--- relations ---
f = friend
r = request to
2011 Aug 19
1
How to post a file via HTTP as multipart/form-data to Facebook?
I would like to post a new photo to a user using `Net::HTTP::multipart`
from a Heroku application to Facebook.
I have the following JSON object:
{"message"=>"My message",
"image"=>#<ActionDispatch::Http::UploadedFile:0x00000004242490
@original_filename="neEZYMAnBI.jpg",
@content_type="application/octet-stream",
2011 Sep 26
2
undefined method `options' for #<EventMachine::HttpClien
Hi , I am writing a rake task to consume twitter stream API. The task
contains the following code:
consumer = OAuth::Consumer.new(CONSUMER_KEY, CONSUMER_SECRET, :site =>
''http://twitter.com'')
access_token =
OAuth::AccessToken.new(consumer,ACCESS_TOKEN,ACCESS_TOKEN_SECRET)
oauth_params = {:consumer => consumer, :token => access_token}
EventMachine.run do
# now,
2020 Jul 08
1
Dovecot - Xoauth2 - keycloak
Hello,
Still trying to make roundcube / Dovecot works with Keycloak.
Dovecot can't seem to validate the access_token that Roundcube gave.
-----
Jul 08 20:48:05 auth: Debug: http-client[1]: request [Req1: GET
2006 May 28
3
Association of table to itself
I''m curious what would be the best way to represent people and whether the
person has someone marked as their friend. Here are my thoughts so far:
People table
- id
- name
Relationships table
- person_id
- friend_id
Now my problem is I don''t know how to set up these associations (if this is
even correct). Friend_id would be an id to someone else from the people
table.
2019 Aug 15
0
Dovecot - Microsoft Azure AD
Hi!
Dovecot supports Lua userdb, which can be used to implement custom user databases, maybe this might work for you? See https://doc.dovecot.org/configuration_manual/authentication/lua_based_authentication for more details.
Aki
> On 15/08/2019 12:16 Lennart Boettcher <lennart.boettcher at secpoint.onmicrosoft.com> wrote:
>
>
> Hello,
>
> Thank you for the quick
2013 Oct 29
1
Time.at
Hi friends,
now i upgrade my ruby version 2.0.0. How can use Time.at In ruby 2.0.0.
Thanks for advance.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to
2006 Jan 28
1
Advice on Optimization, and where to put what?
In my last post I was asking how I could check for the existance of a
record before inserting a new one and this was the helper method that I
was using to do this:
def already_friend_of?(friend)
begin
self.friends.find(friend.id)
true
rescue
false
end
end
I was told that this is not very efficient, as it hits the db every time
I call it. I completely agree and would like to
2012 Oct 16
0
Rails 3 + fb_graph how to get access token to post to my own Facebook page
I am using Rails 3 + fb_graph to post to my own Facebook page. I have
code that works, but it uses an access token that only works for a
couple of hours. And it is very annoying to refresh this access token a
couple of times a day. So I registrated for a FB app. I now have:
my_app = FbGraph::Application.new("App ID");
acc_tok = my_app.get_access_token("App Secret");
me =
2010 Dec 08
0
how to get access token facebook
i am using facebooker
and i have session keys
need to use Graph API that requires access_token
Please suggest me how to get that or how to exchange session keys
into access_token of all users
Thanks in advance
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2006 May 02
0
Self-referential MtoM implementation
ok, guys i have followed the self referential recipe from the book it
works perfect but now i have some doubts, at the end the model are
modified to force the user beign added as a friend that add too who are
adding him so how i can make that the full relationship doesn?t be
complete until the friend beign added approves it(talking in the
implementation of the code of course)?
by the way,
2010 Jul 01
6
Close Modalpopup with RJS
hi guys:
I''m scratching my head on this one: I have a twitter app where I''m
trying to open a modalpopup with a twitter sign in, get them to sign in,
then close the popup and refresh the main window. My code however
refreshes the main window with the popup window result, which I thought
was really strange:
application.html.erb
function OpenModalPopUP()
{
2013 Nov 22
1
Descargar tweets con package twitteR
Hola a tod@s!
Estoy dando mis primeros pasos con R, y mi objetivo es conseguir descargar tweets de cuentas concretas de twitter. Encontre documentación sobre el package twitteR, y he intentado aplicarlo, pero siempre tengo problemas a la hora de conseguir la autentificación con OAuth.
Este es el código que estoy utilizando:
options( RCurlOptions = list(verbose = TRUE, proxy =