Howto work with a page not generated by the scaffold?


#1

I am a newbie Ruby and RoR user. In my tests using the turorials that
I found over the web, everthing is working fine and I am very impressed
about RoR framework.

As I am a Delphi developer, without any web development experience,
There is some thing hard to understando and I didn’t find a tutorial
about this.

I wonder how to create a non-scaffold page ? I have customers, products
and orders for example, and I want to create a page to view the orders
between two dates. So, I need a page that will ask for initial and final
date, I will select the records matching this criteria in the orders
date and joining this 3 tables?

Thanks in advance.


#2

Hello,

Look here : http://www.pragmaticprogrammer.com/titles/rails/index.html
You need to do the depot tutorial to understand the basic

You can download the source of the depot tutorial here. Watch the
source. Very good practice
http://www.pragmaticprogrammer.com/titles/rails/code.html


#3

hi all,
I’m reading the Agile WebDevelopment with Ruby on Rails but I obtain an
error for the code at page 111.
This is the error :
SyntaxError in Admin#ship
Showing app/views/admin/ship.rhtml where line #8 raised:

compile error
./script/…/config/…/app/views/admin/ship.rhtml:8: syntax error
_erbout.concat(( end _form_tag ).to_s); _erbout.concat “\n”
^
Extracted source (around line #8):

5:
6:

7:
8: <%= end _form_tag %>
9:
10:

Trace of template inclusion: /app/views/admin/ship.rhtml

RAILS_ROOT: ./script/…/config/…

and this is the code :

Ordini da spedire

<%= form_tag(:action => "ship") %> <%= render(:partial => "order_line", :collection => @pending_orders) %>

<%= end _form_tag %>

What’s wrong with it ??

thanks

marco


#4

oo00oo wrote:

Hello,

Look here : http://www.pragmaticprogrammer.com/titles/rails/index.html
You need to do the depot tutorial to understand the basic

You can download the source of the depot tutorial here. Watch the
source. Very good practice
http://www.pragmaticprogrammer.com/titles/rails/code.html

Thank you oo00oo to answer my post.

This is a great book, I have it.

Maybe I missunderstood something… I will take a look on it again.

Anyway, Could someone give me the basics steps to create a page for
searching records in a join SQL ? I am not asking for a sample code.

Thank you


#5

On Thursday, February 09, 2006, at 5:16 AM, Marco Casario wrote:

               ^

Extracted source (around line #8):

5:
6:

7:
8: <%= end _form_tag %>
9:
10:

whitespace after end in <%= end _form_tag %>

should be <%= end_form_tag %>

Mikkel B.

www.strongside.dk - Football Portal(DK)
nflfeed.helenius.org - Football News(DK)
ting.minline.dk - Buy Old Stuff!(DK)


#6

Rails mailing list
removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails


#7

thanks :slight_smile: you got it :slight_smile:

too tired
best
marco

----- Original Message -----
From: “Mikkel B.” removed_email_address@domain.invalid
To: removed_email_address@domain.invalid
Sent: Thursday, February 09, 2006 5:20 AM
Subject: Re: [Rails] Error on code of the book Aigle Web D.
with
Rails


#8

This is a great book, I have it.

Maybe I missunderstood something… I will take a look on it again.

I don’t want to sound rude, but the Agile book answers your questions
virtually in the first chapter, you really should look at it again. I
suggest you not worry about the join table stuff until you at least feel
comfortable writing your own non-scaffold code.

There are also plenty of other tutorials about Rails that take you from
scaffolding pages to custom pages. The “4 Days on Rails” tutorial is
very good, although I don’t know if it’s been updated recently. http://
rails.homelinux.org/ Curt H.’ tutorials are also very good and teach
you how to go beyond scaffolding. http://www.onlamp.com/pub/a/onlamp/
2005/01/20/rails.html


#9

Andrew Otwell wrote:

This is a great book, I have it.

Maybe I missunderstood something… I will take a look on it again.

I don’t want to sound rude, but the Agile book answers your questions
virtually in the first chapter, you really should look at it again. I
suggest you not worry about the join table stuff until you at least feel
comfortable writing your own non-scaffold code.

There are also plenty of other tutorials about Rails that take you from
scaffolding pages to custom pages. The “4 Days on Rails” tutorial is
very good, although I don’t know if it’s been updated recently. http://
rails.homelinux.org/ Curt H.’ tutorials are also very good and teach
you how to go beyond scaffolding. http://www.onlamp.com/pub/a/onlamp/
2005/01/20/rails.html

Andrew,

Thanks very much for your reply, you didn’t sound rude. I will
really start from the “beginning” of the Agile book.


#10

Jose, I’m a java programmer working at a shop full of delphi programmers
and I have
watched a couple of them transition to java web apps. One thing that I
noticed is that,
when one is learning a new language and a new framework and
html/css/http all at the same
time, it’s very easy for stuff to get jumbled together… It can be hard
to distinguish
what the language/framework are doing for you vs. the basic standard web
stuff.

So, you might want to spend a little time just reading through some
tutorials on xhtml and
css and how http post/get requests work. There’s lots of this stuff on
the web! w3schools
is a pretty decent site full of tutorials:

http://www.w3schools.com/

just my 2 cents…

b