Hi
I have justed started using Rails.
How do I create a contact page. By this I mean one with a contact form
etc.
Thanks
Hi
I have justed started using Rails.
How do I create a contact page. By this I mean one with a contact form
etc.
Thanks
Andrew wrote:
Hi
I have justed started using Rails.
How do I create a contact page. By this I mean one with a contact form
etc.Thanks
Hi Andrew,
create database table ‘contact’ with fields you would like in your form,
and run scaffold generator in your application directory:
ruby script/generate scaffold Contact new
it should be working:
http://localhost:3000/contact/new
After that you can customize view, model and controller to add
obligatory fields, etc
Bojan
–
Bojan M.
Informatika Mihelac, Bojan M. s.p. | www.informatikamihelac.com
-> tools, scripts, tricks from our code lab: http://source.mihelac.org
I get
“Couldn’t find ‘scafford’ generator”
I am typing this command from the root folder (the one which has the
folders app, config, db,…
I have also typed the command in the app folder
Alex Y. wrote:
Andrew Ye wrote:
I get
“Couldn’t find ‘scafford’ generator”
Is that a typo? Should be “scaffold”.
yes, it should be scaffold
–
Bojan M.
Informatika Mihelac, Bojan M. s.p. | www.informatikamihelac.com
-> tools, scripts, tricks from our code lab: http://source.mihelac.org
Bojan M. wrote:
Alex Y. wrote:
Andrew Ye wrote:
I get
“Couldn’t find ‘scafford’ generator”
Is that a typo? Should be “scaffold”.yes, it should be scaffold
–
Bojan M.
Informatika Mihelac, Bojan M. s.p. | www.informatikamihelac.com
-> tools, scripts, tricks from our code lab: http://source.mihelac.org
Opp!!
Andrew Ye wrote:
I get
“Couldn’t find ‘scafford’ generator”
Is that a typo? Should be “scaffold”.
Andrew Ye wrote:
Is there a step by step guide?
Try the tutorials listed here:
regards
Justin
Is there a step by step guide?
The command now works
It has now created the folder in the views folder called new.
Isnt it http://localhost:3000/new/contact ???
I have no idea what to put in the rhtml file. What does the file in the
new folder need to be called?
Thanks
Bojan M. wrote:
Andrew wrote:
Hi
I have justed started using Rails.
How do I create a contact page. By this I mean one with a contact form
etc.Thanks
Hi Andrew,
create database table ‘contact’ with fields you would like in your form,
and run scaffold generator in your application directory:
ruby script/generate scaffold Contact newit should be working:
http://localhost:3000/contact/newAfter that you can customize view, model and controller to add
obligatory fields, etcBojan
–
Bojan M.
Informatika Mihelac, Bojan M. s.p. | www.informatikamihelac.com
-> tools, scripts, tricks from our code lab: http://source.mihelac.org
I have run the scaffold command and created the new table in the
database called contact. the table has the fields i want e.g. id, name,
email, comment
I am lost at what i need to do next.
Its so confusing Rails - try to get my head around where it stores
everything, how its configured!!
I am lost at what i need to do next.
Its so confusing Rails - try to get my head around where it stores
everything, how its configured!!
Try reading http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html.
This provides the information you need.
regards
Claus
Is there a way to create a contact form that sends an email without
having a table related to it.
In my case I do not need a table contacts, I only need to send an email.
thanks
Your N.:
Your email:
Message:
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs