search for: friendli

Displaying 20 results from an estimated 15451 matches for "friendli".

Did you mean: friendly
2007 Jan 20
2
Conditional pluralize without the number
Hi. Assume you have an array of person names. I want to generate results in my view that look like this: Abby is your friend or Abby, Bob, and Carol are your friends. So I''d like to say: <%= friends.to_sentence %> <%= pluralize(friends.count, "is") %> your <%= pluralize(friends.count, "friend") %> But because pluralize puts in the
2010 Feb 13
3
extension not found
hi friend need ur help in dial plan, i want to allow exten 2000 to 2005 can make call outside and exten 2006 to 2010 can not make call outside. heres my dial plan. ? sip.conf ? [general] port = 5060 bindaddr = 0.0.0.0 context = others [2000] type=friend context=outside secret=1234 host=dynamic [2001] type=friend context=outside secret=1234 host=dynamic [2002] type=friend context=outside
2006 Feb 25
0
self referential habtm using join tables
All: I have been working on making a self-referential habtm relationship that uses a join model because I want to store info about the relationship. I have been using two sections from Chad Fowler''s "Rails Recipes" as a guide, "Self-referential Many-to-Many Relationships" and "Many to Many Relationships Where the Relationship Itself has Data". So far I have
2006 Jan 27
2
User.already_friend_of(friend)?
I have a User model who HBTM Friends (class User). I would like to check for the existance of a user in the friends table before actually adding them (in case they were already added as a friend.) I have a method called already_friend_of?(friend) defined in my User model, but I am not sure how to define this method. I simply want to check to see if one user is already a friend of another user
2006 Feb 27
0
self-referential many-to-many using a join model
Hello! I have been working on making a self-referential habtm relationship that uses a join model because I want to store info about the relationship. I have been using two sections from Chad Fowler''s "Rails Recipes" as a guide, "Self-referential Many-to-Many Relationships" and "Many to Many Relationships Where the Relationship Itself has Data". So far I
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
2006 Mar 31
6
Adding objects to a :through association
So I''m one of those nasty people building a self-referential habtm-like Association using the funky new :through stuff. This is about users having friends, so here''s my user.rb: class User < ActiveRecord::Base has_many :friendships, :foreign_key => ''user_id'' has_many :friends, :through => :friendships, :source => :friend end And here''s
2006 Feb 13
5
Acts_as_taggable pluralize
I am implementing a messaging system, which requires broadcast to group feature. Instead of a relatively clunky habtm group structure, I am using tags. Form a usability standpoint, it would be helpful to avoid redundant tags. Like, friend vs friends OR client vs. clients. Is it practical to filter tags, before entry, to avoid duplicate tags like plural vs. singular? -- Posted via
2011 Apr 20
1
add brick unsuccessful
Hi again, I'm having trouble testing the add-brick feature. I'm using a replicate 2 setup with currently 2 nodes in and am trying to add 2 more. The command blocks for a bit until i get an "Add Brick unsuccessful" message. According to etc-glusterfs-glusterd.vol.log below i can't seem to find anything : [2011-04-20 12:55:06.944593] I
2009 May 04
1
Syncronization in rails
Hello, Here is the logic that I am trying to achieve. I have a User Model and the business rule is that user can accept maximum 5 friends requests. for this I have an accept method in User Model which looks similar to below code snippet def accept(friend) raise ArgumentError if self.friends.count >= MAX_FRIENDS_ALLOWED ... ... #code to add friend to friends list end As you
2008 Jan 24
12
getting started with facebooker
Hi, I started with rfacebook but given the recent events figure its best to move over to facebooker. I have: 1.) Installed the facebooker plugin 2.) setup my facebook app (fbml/canvas) 3.) created a method on controller & view to handle initial request 4.) added "ensure_application_is_installed_by_facebook_user" to top off application.rb I am able to get to my landing page
2006 Jun 26
2
How can I minimize SQL queries
I have users, who have friends that are also users in mysql database. I have a foreign key for both users, so that I can reference their data directly. My problem is displaying friends. My for statement would look something like this: for i in(0..@user.friends.length) puts @user.friends[i].user.name end so @user is the user that i''m displaying friends for... .friends are the
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
2006 Aug 14
8
How search engine friendly are RoR sites?
I am a total RoR virgin, and took my first steps this weekend into the Ruby world. A lot of sites I create need to be as SEO friendly as possible, particularly for google. Before I delve any further, can anyone tell me how friendly the dynamic URLs or if there is the usual rewrite mod for rugby? Thanks Mike -- Posted via http://www.ruby-forum.com/.
2008 Mar 18
0
Merge Facebook friends with app friends
I have an attribute on my user model called friends, is it possible to merge the session[:facebook_session].user.friends_with_this_app with the friends attribute? Optimally I could call @user.friends and it would return the standalone app''s friends and the Facebook friends who have the app.
2008 May 06
1
check_friendship method only returning value of last pair
Hello, I''m new to facebooker and ruby, so not sure if the issue I am having is due to my misunderstanding or a bug in facebooker plugin. Here is what I have: def show @current_user ||= facebook_session.user @member ||= params[:id].to_s==@current_user.id.to_s ? @current_user : Facebooker::User.new(params[:id]) #for each of current_user''s friends, check if they are
2012 Mar 28
1
parallel bash scripts
Check out the redirection at the end of each command. 1>&2 redirects the standard out of your child command to the standard error which then appears in the parent shell. At the end the last & launches your command into a background shell and then moves on to launch the next command. The redirections don't care if the command ever terminates. The result is that both commands
2006 Jan 02
3
Altering the accessor of an association collection
I want to be able to do something like this (for example): class Person < ActiveRecord::Base has_many :friends def friends(living_in = :uk) # filter based on parameters here end end Is there any way I can redefine the accessor for an association whilst still being able to get the values? Basically, I''m looking for an equivilent of read_attribute() for associations. --
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`),
2007 May 10
5
Pagination has many through problems
I have searched for days for an example that demonstrates what i would like to do, and this morning i thought i''d worked it out, but no....here''s what i have: Controller ========== class ProfilesController < ApplicationController def friends current_user.profile.friends end def list_friends @profile_pages, @profiles = paginate( friends, :per_page => 10) end end