Forum: Ruby on Rails Naming convention

Af8f675b324932851700efcd7d497631?d=identicon&s=25 Phil Dobbin (phildobbin)
on 2014-03-01 23:19
(Received via mailing list)
Hi, all.

When invoking scaffolding such as:

`$ rails g scaffold Post title:string description:text`

what is permissible or is there a list of words that can be used in
place of `Post`?

I know you can use Article, Store, etc but what other options are there?
I'm looking for a static page a bit like <http://getbootstrap.com> as
I'm attempting a company web site/personal page.

Any help appreciated.

Cheers,

  Phil (who's very new to Rails).

--
currently (ab)using
CentOS 6.5, Debian Squeeze & Wheezy, Fedora 19 & 20, OS X Snow Leopard,
RHEL 7, Ubuntu Precise & Saucy
GnuGPG Key : http://phildobbin.org/publickey.asc
Bee69cfed999cd13e3bff73d472a39ee?d=identicon&s=25 Hassan Schroeder (Guest)
on 2014-03-02 00:51
(Received via mailing list)
On Sat, Mar 1, 2014 at 2:17 PM, Phil Dobbin <phildobbin@gmail.com>
wrote:

> `$ rails g scaffold Post title:string description:text`
>
> what is permissible or is there a list of words that can be used in
> place of `Post`?

You're creating a model -- other than adhering to the Rails
conventions
(http://guides.rubyonrails.org/active_record_basics...)
(and avoiding reserved words) it's up to you.

> I'm looking for a static page

If you're only creating a static page, you don't need a model -- just
create a controller and a view.

HTH,
--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
http://about.me/hassanschroeder
twitter: @hass
Af8f675b324932851700efcd7d497631?d=identicon&s=25 Phil Dobbin (phildobbin)
on 2014-03-02 01:14
(Received via mailing list)
On 01/03/2014 23:49, Hassan Schroeder wrote:

>
>> I'm looking for a static page
>
> If you're only creating a static page, you don't need a model -- just
> create a controller and a view.
>
> HTH,
>

Hi, Hassan.

Thanks, that's a great help. I'm new to Rails & am spending most of my
time searching for basic stuff. I guess reading the guides at Ruby on
Rails is the first place to start.

Cheers,

  Phil...

--
currently (ab)using
CentOS 6.5, Debian Squeeze & Wheezy, Fedora 19 & 20, OS X Snow Leopard,
RHEL 7, Ubuntu Precise & Saucy
GnuGPG Key : http://phildobbin.org/publickey.asc
4c6bde00168d595053c09aac7e487f8e?d=identicon&s=25 Colin Law (Guest)
on 2014-03-02 10:13
(Received via mailing list)
On 2 March 2014 00:13, Phil Dobbin <phildobbin@gmail.com> wrote:
> ...
> Thanks, that's a great help. I'm new to Rails & am spending most of my
> time searching for basic stuff. I guess reading the guides at Ruby on
> Rails is the first place to start.

Also work right through a good tutorial such as railstutorial.org
(which is free to use online).  That will show you the basics of
rails.

Colin
Af8f675b324932851700efcd7d497631?d=identicon&s=25 Phil Dobbin (phildobbin)
on 2014-03-02 11:29
(Received via mailing list)
On 02/03/2014 09:10, Colin Law wrote:

> On 2 March 2014 00:13, Phil Dobbin <phildobbin@gmail.com> wrote:
>> ...
>> Thanks, that's a great help. I'm new to Rails & am spending most of my
>> time searching for basic stuff. I guess reading the guides at Ruby on
>> Rails is the first place to start.
>
> Also work right through a good tutorial such as railstutorial.org
> (which is free to use online).  That will show you the basics of
> rails.

Thanks for that, Colin.

I've also subscribed to Rails Cast Pro which is pretty good.

I'm really enjoying Rails. Long may it continue so...

Cheers,

  Phil...

--
currently (ab)using
CentOS 6.5, Debian Squeeze & Wheezy, Fedora 19 & 20, OS X Snow Leopard,
RHEL 7, Ubuntu Precise & Saucy
GnuGPG Key : http://phildobbin.org/publickey.asc
4c6bde00168d595053c09aac7e487f8e?d=identicon&s=25 Colin Law (Guest)
on 2014-03-02 14:50
(Received via mailing list)
On 2 March 2014 10:27, Phil Dobbin <phildobbin@gmail.com> wrote:
>> rails.
>
> Thanks for that, Colin.
>
> I've also subscribed to Rails Cast Pro which is pretty good.
>
> I'm really enjoying Rails. Long may it continue so...

I also suggest sticking round here, make sure that for any posts that
you understand the question, that you also understand the answer.  It
is a great way of learning, and in particular learning about aspects
that you did not even know existed.

Colin
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.