# Social Networking

**URL:** <https://www.ruby-forum.com/t/social-networking/208679>\
**Category:** Rails\
**Created:** [June 24, 2011, 8:18am UTC](https://www.ruby-forum.com/t/social-networking/208679 "2011-06-24T08:18:10Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [June 24, 2011, 8:18am UTC](https://www.ruby-forum.com/t/social-networking/208679/1 "2011-06-24T08:18:10Z")

</div>

Hi,

I want to create a family website which includes social networking  
features.

The site should have dynamic articles, news, announcements, events,  
gallery  
etc public.  
And it should have a social networking part for family members.  
Also an admin controller for public contents and social networking  
administration.

I am familiar with Ruby and RoR.  
How can I start with these? Is there any app / cms for this? Will it be  
good  
to use TDD?

Thank you  
sayuj

---

<div class="post-metadata">

**Author:** ![sayuj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/2bfe46/32.png) [@sayuj](https://www.ruby-forum.com/u/sayuj)\
**Post date:** [June 24, 2011, 10:56am UTC](https://www.ruby-forum.com/t/social-networking/208679/2 "2011-06-24T10:56:58Z")

</div>

Hi Sayuj,

try [https://joindiaspora.com/](https://joindiaspora.com/) its pretty much what you want, it’s open  
source and it’s ROR!

Cheers,  
Bernd

Am 24.06.2011 08:16, schrieb Sayuj O.:

> I am familiar with Ruby and RoR.  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid).  
> For more options, visit this group at  
> [http://groups.google.com/group/rubyonrails-talk?hl=en](http://groups.google.com/group/rubyonrails-talk?hl=en).

–

---

<div class="post-metadata">

**Author:** ![sayuj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/2bfe46/32.png) [@sayuj](https://www.ruby-forum.com/u/sayuj)\
**Post date:** [June 24, 2011, 10:56am UTC](https://www.ruby-forum.com/t/social-networking/208679/3 "2011-06-24T10:56:59Z")

</div>

Hi,

You may want to tried something similar on the github. Someone may  
already  
done it. Anyway I think it would be good to start with Tdd techniques  
because it will save your time.  
On 24 Jun 2011 07:17, “Sayuj O.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi,
> 
> I want to create a family website which includes social networking  
> features.
> 
> The site should have dynamic articles, news, announcements, events,  
> gallery  
> etc public.  
> And it should have a social networking part for family members.  
> Also an admin controller for public contents and social networking  
> administration.
> 
> I am familiar with Ruby and RoR.  
> How can I start with these? Is there any app / cms for this? Will it be  
> good  
> to use TDD?
> 
> Thank you  
> sayuj
> 
> –  
> You received this message because you are subscribed to the Google G.  
> “Ruby on Rails: Talk” group.  
> To post to this group, send email to [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid).  
> To unsubscribe from this group, send email to  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid).  
> For more options, visit this group at  
> [http://groups.google.com/group/rubyonrails-talk?hl=en](http://groups.google.com/group/rubyonrails-talk?hl=en).

---

<div class="post-metadata">

**Author:** ![sayuj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/2bfe46/32.png) [@sayuj](https://www.ruby-forum.com/u/sayuj)\
**Post date:** [June 24, 2011, 7:54pm UTC](https://www.ruby-forum.com/t/social-networking/208679/4 "2011-06-24T19:54:00Z")

</div>

Try some of these:

> **[GitHub - insoshi/insoshi: An open source social networking platform in Ruby...](https://github.com/insoshi/insoshi#readme)**
>
> An open source social networking platform in Ruby on Rails - GitHub - insoshi/insoshi: An open source social networking platform in Ruby on Rails

[http://communityengine.org/](http://communityengine.org/)

[http://lovdbyless.com/](http://lovdbyless.com/)

> **[EngineY.com is For Sale | BrandBucket](https://www.brandbucket.com/names/enginey?source=ext)**
>
> Buy the domain name EngineY.com and launch your business with a premium domain and a high quality logo.

Lovd by Less looks pretty good, havent had a chance to try it yet tho.

Best,  
Pardeep.

---

<div class="post-metadata">

**Author:** ![sayuj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/2bfe46/32.png) [@sayuj](https://www.ruby-forum.com/u/sayuj)\
**Post date:** [June 27, 2011, 2:26pm UTC](https://www.ruby-forum.com/t/social-networking/208679/5 "2011-06-27T14:26:07Z")

</div>

That’s a pretty good name for a social networking site. I feel like I  
devolve a little bit every time I use Facebook et al.

---

<div class="post-metadata">

**Author:** ![sayuj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/2bfe46/32.png) [@sayuj](https://www.ruby-forum.com/u/sayuj)\
**Post date:** [June 25, 2011, 11:19am UTC](https://www.ruby-forum.com/t/social-networking/208679/6 "2011-06-25T11:19:48Z")

</div>

TRY MY SOCIAL NETWORKING WEBSITE named DEVOLVE - social networking  
website for developers. Code is available on  
[GitHub - sukesh1989/devolve: This is a social networking site dedicated to software programmers.](http://github.com/devolve/devolve).

---

<div class="post-metadata">

**Author:** ![sayuj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/2bfe46/32.png) [@sayuj](https://www.ruby-forum.com/u/sayuj)\
**Post date:** [June 27, 2011, 6:39pm UTC](https://www.ruby-forum.com/t/social-networking/208679/7 "2011-06-27T18:39:33Z")

</div>

A User has many teachers. I’m trying to lock down my API. I have a  
“user.add\_teacher teacher” method and want to make that the _only_ way  
to “user.teachers \<\< teacher”. Any way to lock down the teachers  
association so it is read only from outside the user class and only  
settable within self?

I’m not just looking for attr\_protected to avoid mass assignment. I’m  
specifically looking to ensure that nobody on the team will write  
“user.teachers \<\< teacher” and bypass all of the additional business  
logic in the add\_teacher method. I know I can do a “find within project”  
for “teachers \<\<” but don’t want to remember to have to do that.

I know my specs should catch anything that’s amiss, and I’m not sure  
whether this is an idiomatic approach in Ruby/Rails but I’d appreciate  
any thoughts/suggestions.

Thanks,  
Peter

---

<div class="post-metadata">

**Author:** ![sayuj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/2bfe46/32.png) [@sayuj](https://www.ruby-forum.com/u/sayuj)\
**Post date:** [June 27, 2011, 3:14pm UTC](https://www.ruby-forum.com/t/social-networking/208679/8 "2011-06-27T15:14:21Z")

</div>

On 25 June 2011 10:18, sukesh [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> TRY MY SOCIAL NETWORKING WEBSITE named DEVOLVE - social networking  
> website for developers. Code is available on [GitHub - sukeshsalian29/devolve: This is a social networking site dedicated to software programmers. · GitHub](http://github.com/devolve/devolve).

Something other than the boilerplate README would be useful for people  
to get an idea what the code is about

---

<div class="post-metadata">

**Author:** ![sayuj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/2bfe46/32.png) [@sayuj](https://www.ruby-forum.com/u/sayuj)\
**Post date:** [June 27, 2011, 11:32pm UTC](https://www.ruby-forum.com/t/social-networking/208679/9 "2011-06-27T23:32:06Z")

</div>

On Jun 27, 5:37pm, Peter B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> A User has many teachers. I’m trying to lock down my API. I have a  
> “user.add\_teacher teacher” method and want to make that the _only_ way to  
> “user.teachers \<\< teacher”. Any way to lock down the teachers association so it is  
> read only from outside the user class and only settable within self?
> 
> I’m not just looking for attr\_protected to avoid mass assignment. I’m  
> specifically looking to ensure that nobody on the team will write “user.teachers  
> \<\< teacher” and bypass all of the additional business logic in the add\_teacher  
> method. I know I can do a “find within project” for “teachers \<\<” but don’t want  
> to remember to have to do that.
> 
> I know my specs should catch anything that’s amiss, and I’m not sure whether  
> this is an idiomatic approach in Ruby/Rails but I’d appreciate any  
> thoughts/suggestions.

could you overwrite \<\< in your association proxy ie

class User  
has\_many :teachers do  
def \<\<(\*args)  
raise “don’t use me!”  
end  
end  
end

?

There are lots of other ways users can add teachers though, eg  
user.teachers.build, Teacher.new(:user\_id =\> some\_user.id) etc so I  
don’t thing you can make this completely watertight.

Fred

---

<div class="post-metadata">

**Author:** ![sayuj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/2bfe46/32.png) [@sayuj](https://www.ruby-forum.com/u/sayuj)\
**Post date:** [June 28, 2011, 12:59am UTC](https://www.ruby-forum.com/t/social-networking/208679/10 "2011-06-28T00:59:02Z")

</div>

Peter B. \<peter@…\> writes:

> A User has many teachers. I’m trying to lock down my API. I have  
> a “user.add\_teacher teacher” method and want  
> to make that the _only_ way to “user.teachers \<\< teacher”. Any way to lock  
> down the teachers association so  
> it is read only from outside the user class and only settable within self?
> 
> I’m not just looking for attr\_protected to avoid mass assignment. I’m  
> specifically looking to ensure that  
> nobody on the team will write “user.teachers \<\< teacher” and bypass all of  
> the additional business logic  
> in the add\_teacher method. I know I can do a “find within project”  
> for “teachers \<\<” but don’t want to  
> remember to have to do that.
> 
> I know my specs should catch anything that’s amiss, and I’m not sure whether  
> this is an idiomatic approach in  
> Ruby/Rails but I’d appreciate any thoughts/suggestions.
> 
> Thanks,  
> Peter

It seems there is business logic to check when adding teachers to users  
which  
goes beyond a simple “validates\_associated :teacher”. Rather than  
restrict  
developers to a single method call, I would investigate custom  
validations.

See  
[http://guides.rubyonrails.org/active\_record\_validations\_callbacks.html](http://guides.rubyonrails.org/active_record_validations_callbacks.html)

---

<div class="post-metadata">

**Author:** ![sayuj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/2bfe46/32.png) [@sayuj](https://www.ruby-forum.com/u/sayuj)\
**Post date:** [June 27, 2011, 9:38pm UTC](https://www.ruby-forum.com/t/social-networking/208679/11 "2011-06-27T21:38:54Z")

</div>

On Mon, Jun 27, 2011 at 9:37 AM, Peter B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I’m specifically looking to ensure that nobody on the team will write  
> “user.teachers \<\< teacher” and bypass all of the additional business  
> logic in the add\_teacher method.

Maybe you could instead just use the Association callbacks –

before\_add, after\_add, before\_remove, after\_remove

to run your business logic on each operation?

## FWIW,

Hassan S. ------------------------ [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[Hassan Schroeder | about.me](http://about.me/hassanschroeder)  
twitter: @hassan

---

<div class="post-metadata">

**Author:** ![sayuj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/2bfe46/32.png) [@sayuj](https://www.ruby-forum.com/u/sayuj)\
**Post date:** [June 28, 2011, 7:09am UTC](https://www.ruby-forum.com/t/social-networking/208679/12 "2011-06-28T07:09:23Z")

</div>

Hi Sukesh,

Is there any administration part for the same?

On Mon, Jun 27, 2011 at 6:42 PM, Peter H. \<

---

<div class="post-metadata">

**Author:** ![sayuj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/2bfe46/32.png) [@sayuj](https://www.ruby-forum.com/u/sayuj)\
**Post date:** [June 30, 2011, 12:57pm UTC](https://www.ruby-forum.com/t/social-networking/208679/13 "2011-06-30T12:57:54Z")

</div>

Hi Bernd,

Diaspora is a little crazy to install 🙂

Diaspora is awesome. But it’s developed under rails 2. Do you know, is  
Diaspora available on rails 3 also?  
Or is there any way to convert a rails 2 app to rails 3?

And, shall I customise Diaspora and use for my personal use on internet?  
Is  
there any problem for this?

thank you,  
sayuj o

---

<div class="post-metadata">

**Author:** ![sayuj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/2bfe46/32.png) [@sayuj](https://www.ruby-forum.com/u/sayuj)\
**Post date:** [October 26, 2011, 6:57am UTC](https://www.ruby-forum.com/t/social-networking/208679/14 "2011-10-26T06:57:13Z")

</div>

On Fri, Jun 24, 2011 at 11:22 PM, [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
\<[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> wrote:

> Lovd by Less looks pretty good, havent had a chance to try it yet tho.  
> The site should have dynamic articles, news, announcements, events, gallery  
> sayuj

hi  
sayuj

you can go: [GitHub - kausikbakshi/friends: orkut type · GitHub](https://github.com/kausikbakshi/friends)

here you find an example of social networking (not admin panel include  
here)  
I think this will help you.

Rails version  
2.3.9  
ruby  
1.8.7

Thanks & Regards  
Kausik B.

---

<div class="post-metadata">

**Author:** ![sayuj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/2bfe46/32.png) [@sayuj](https://www.ruby-forum.com/u/sayuj)\
**Post date:** [July 4, 2011, 6:51am UTC](https://www.ruby-forum.com/t/social-networking/208679/15 "2011-07-04T06:51:43Z")

</div>

On Fri, Jun 24, 2011 at 1:52 PM, [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)wrote:

> Lovd by Less looks pretty good, havent had a chance to try it yet tho.

```
 hey
  anybody is using any one from above links ?

Thanks

```

[amritpalpathakgne.wordpress.com](http://amritpalpathakgne.wordpress.com)

---

<div class="post-metadata">

**Author:** ![sayuj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/2bfe46/32.png) [@sayuj](https://www.ruby-forum.com/u/sayuj)\
**Post date:** [October 26, 2011, 1:53pm UTC](https://www.ruby-forum.com/t/social-networking/208679/16 "2011-10-26T13:53:05Z")

</div>

Hi!

Two or three months ago someone announced social stream in the list:

> **[GitHub - ging/social\_stream: A framework for building distributed social...](https://github.com/ging/social_stream)**
>
> A framework for building distributed social network websites - GitHub - ging/social\_stream: A framework for building distributed social network websites

---

<div class="post-metadata">

**Author:** ![sayuj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/2bfe46/32.png) [@sayuj](https://www.ruby-forum.com/u/sayuj)\
**Post date:** [October 26, 2011, 1:58pm UTC](https://www.ruby-forum.com/t/social-networking/208679/17 "2011-10-26T13:58:03Z")

</div>

Hello everaldo, this is a promising project! its really great! I think I  
will use it someday! I loved it!

2011/10/26 Everaldo G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> > > good to use TDD?  
> > > [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid).  
> > > here you find an example of social networking (not admin panel include
> 
> –  
> You received this message because you are subscribed to the Google G.  
> “Ruby on Rails: Talk” group.  
> To post to this group, send email to [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid).  
> To unsubscribe from this group, send email to  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid).  
> For more options, visit this group at  
> [http://groups.google.com/group/rubyonrails-talk?hl=en](http://groups.google.com/group/rubyonrails-talk?hl=en).

–  
thiagocifani

> **[thiagocifani](https://thiagocifani.wordpress.com/)**
>
> Ruby on Rails e outros

[twitter.com/thiagocifani](http://twitter.com/thiagocifani)  
[del.icio.us/thiagocifani](http://del.icio.us/thiagocifani)  
[http://del.icio.us/thiagocifani](http://del.icio.us/thiagocifani)
