# How to create embedding code in ror

**URL:** <https://www.ruby-forum.com/t/how-to-create-embedding-code-in-ror/189865>\
**Category:** Rails\
**Created:** [June 9, 2010, 4:34am UTC](https://www.ruby-forum.com/t/how-to-create-embedding-code-in-ror/189865 "2010-06-09T04:34:16Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![soesan01](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbe5ce/32.png) [@soesan01](https://www.ruby-forum.com/u/soesan01)\
**Post date:** [June 9, 2010, 4:34am UTC](https://www.ruby-forum.com/t/how-to-create-embedding-code-in-ror/189865/1 "2010-06-09T04:34:16Z")

</div>

Hi guys,

Could you give me a sample or link for creating embedding code in ruby  
on  
rails?

Thanks,  
Yudi S.

---

<div class="post-metadata">

**Author:** ![soesan01](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbe5ce/32.png) [@soesan01](https://www.ruby-forum.com/u/soesan01)\
**Post date:** [June 9, 2010, 5:41am UTC](https://www.ruby-forum.com/t/how-to-create-embedding-code-in-ror/189865/2 "2010-06-09T05:41:02Z")

</div>

Yudi S. wrote:

> Hi guys,
> 
> Could you give me a sample or link for creating embedding code in ruby  
> on  
> rails?

What do you mean by “embedding code”?

> Thanks,  
> Yudi S.

–Â  
Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

Sent from my iPhone

---

<div class="post-metadata">

**Author:** ![soesan01](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbe5ce/32.png) [@soesan01](https://www.ruby-forum.com/u/soesan01)\
**Post date:** [June 9, 2010, 8:57am UTC](https://www.ruby-forum.com/t/how-to-create-embedding-code-in-ror/189865/3 "2010-06-09T08:57:05Z")

</div>

What I am trying to do is: I creating a survey website. User can  
register to create a survey and this survey can be embedded to other  
site with providing embedded script. The problem I have, I don’t know  
how to create embedded code via ruby on rails. I never done this.

Please help!!!

Thanks,  
Ys

Marnen Laibow-Koser wrote:

> Yudi S. wrote:
> 
> > Hi guys,
> > 
> > Could you give me a sample or link for creating embedding code in ruby  
> > on  
> > rails?
> 
> What do you mean by “embedding code”?
> 
> > Thanks,  
> > Yudi S.
> 
> –Â  
> Marnen Laibow-Koser  
> [http://www.marnen.org](http://www.marnen.org)  
> removed\_email\_address@domain.invalid
> 
> Sent from my iPhone

---

<div class="post-metadata">

**Author:** ![soesan01](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbe5ce/32.png) [@soesan01](https://www.ruby-forum.com/u/soesan01)\
**Post date:** [June 9, 2010, 2:25pm UTC](https://www.ruby-forum.com/t/how-to-create-embedding-code-in-ror/189865/4 "2010-06-09T14:25:11Z")

</div>

Thanks for yorur help Peter.  
Do you have link or tutorial guide in the internet? I am new with this.

Yudi

Peter De Berdt wrote:

> On 09 Jun 2010, at 08:57, Yudi S. wrote:
> 
> > What I am trying to do is: I creating a survey website. User can  
> > register to create a survey and this survey can be embedded to other  
> > site with providing embedded script. The problem I have, I don’t know  
> > how to create embedded code via ruby on rails. I never done this.
> 
> Your embed code should be something alone the lines of:
> 
> Exactly the same as you would do in any other language, like PHP,  
> Perl, …
> 
> You basically need to load your survey into a frame embedded into your  
> users site and on your RoR backend it won’t make any difference  
> whether it’s loaded into the iFrame or would just be directly accessed.
> 
> Best regards
> 
> Peter De Berdt

---

<div class="post-metadata">

**Author:** ![soesan01](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbe5ce/32.png) [@soesan01](https://www.ruby-forum.com/u/soesan01)\
**Post date:** [June 9, 2010, 3:58pm UTC](https://www.ruby-forum.com/t/how-to-create-embedding-code-in-ror/189865/5 "2010-06-09T15:58:34Z")

</div>

On 09 Jun 2010, at 14:25, Yudi S. wrote:

> Thanks for yorur help Peter.  
> Do you have link or tutorial guide in the internet? I am new with  
> this.

I’ll give you the basics, the rest is up to you (setting height,  
width, injecting in a specific div etc):

Best regards

Peter De Berdt

---

<div class="post-metadata">

**Author:** ![soesan01](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbe5ce/32.png) [@soesan01](https://www.ruby-forum.com/u/soesan01)\
**Post date:** [June 14, 2010, 6:35am UTC](https://www.ruby-forum.com/t/how-to-create-embedding-code-in-ror/189865/6 "2010-06-14T06:35:58Z")

</div>

Thank you for your help.  
I tried to create embedding code like this:

[new survey](http://polsta.net/?embed=25cf2273474a99d9a0809d40bc8b495b)\<script  
type=“text/javascript” src=“[http://polsta.net/javascripts/embedding.js](http://polsta.net/javascripts/embedding.js)”

> 

Is there possible? Do I need to create embedding.js? How I read those  
script?

Yudi S.

Peter De Berdt wrote:

> On 09 Jun 2010, at 14:25, Yudi S. wrote:
> 
> > Thanks for yorur help Peter.  
> > Do you have link or tutorial guide in the internet? I am new with  
> > this.
> 
> I’ll give you the basics, the rest is up to you (setting height,  
> width, injecting in a specific div etc):
> 
> Best regards
> 
> Peter De Berdt

---

<div class="post-metadata">

**Author:** ![soesan01](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbe5ce/32.png) [@soesan01](https://www.ruby-forum.com/u/soesan01)\
**Post date:** [June 9, 2010, 11:26am UTC](https://www.ruby-forum.com/t/how-to-create-embedding-code-in-ror/189865/7 "2010-06-09T11:26:56Z")

</div>

On 09 Jun 2010, at 08:57, Yudi S. wrote:

> What I am trying to do is: I creating a survey website. User can  
> register to create a survey and this survey can be embedded to other  
> site with providing embedded script. The problem I have, I don’t know  
> how to create embedded code via ruby on rails. I never done this.

Your embed code should be something alone the lines of:

Exactly the same as you would do in any other language, like PHP,  
Perl, …

You basically need to load your survey into a frame embedded into your  
users site and on your RoR backend it won’t make any difference  
whether it’s loaded into the iFrame or would just be directly accessed.

Best regards

Peter De Berdt

---

<div class="post-metadata">

**Author:** ![soesan01](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbe5ce/32.png) [@soesan01](https://www.ruby-forum.com/u/soesan01)\
**Post date:** [June 14, 2010, 11:44am UTC](https://www.ruby-forum.com/t/how-to-create-embedding-code-in-ror/189865/8 "2010-06-14T11:44:53Z")

</div>

Yudi S. wrote:

> Thank you for your help.  
> I tried to create embedding code like this:
> 
> [new survey](http://polsta.net/?embed=25cf2273474a99d9a0809d40bc8b495b)\<script  
> type=“text/javascript” src=“[http://polsta.net/javascripts/embedding.js](http://polsta.net/javascripts/embedding.js)”
> 
> >

And what happened when you tried?

> Is there possible? Do I need to create embedding.js? How I read those  
> script?

These are questions best directed to a JavaScript forum.

> Yudi S.

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid
