thanks for your help. i know what the problem. i forgot to add syntax to
show it, because usually it make automaticly. thanks for your help.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To p
On Fri, Dec 14, 2012 at 6:16 PM, Mas Bejo wrote:
> owh, i see.. i forgot that command. i have been try that command in
> other app (but when i create database via rails), but i forgot to try
> this command in this app.
>
>
> so, this the step, i try to run this:
>
> "rails console"
>
> and then i
owh, i see.. i forgot that command. i have been try that command in
other app (but when i create database via rails), but i forgot to try
this command in this app.
so, this the step, i try to run this:
"rails console"
and then i run this command:
"Anggotum.all"
it can show all of my record
On Fri, Dec 14, 2012 at 2:10 PM, Mas Bejo wrote:
> i didn't understand your instruction. what must i run in console? did
> you mean "rails server"? or what else?
>
i mean rails console.
http://guides.rubyonrails.org/command_line.html#rails-console
you really need to go through a tutorial first
i didn't understand your instruction. what must i run in console? did
you mean "rails server"? or what else?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email t
On Fri, Dec 14, 2012 at 11:41 AM, Mas Bejo wrote:
> 1. Rails new First_app
> 2. Change config database.yml
> 3. Rake db:schema:dump
> 4. Rails g scaffold Anggota –migration false
> 5. Change First_app\app\model\anggotum.rb with this syntax
>
> -
> class A
1. Rails new First_app
2. Change config database.yml
3. Rake db:schema:dump
4. Rails g scaffold Anggota –migration false
5. Change First_app\app\model\anggotum.rb with this syntax
-
class Anggotum < ActiveRecord::Base
set_table_name "anggota"
end
---
On Fri, Dec 14, 2012 at 10:24 AM, Mas Bejo wrote:
> no, i didn't use member table, i use member word just to describe to you
> singular and plural form. because i little confuse tell you plural form
> from word "anggota"
>
ok. Just make sure that you're using the table name on the db on the
Ang
no, i didn't use member table, i use member word just to describe to you
singular and plural form. because i little confuse tell you plural form
from word "anggota"
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on
On Fri, Dec 14, 2012 at 10:14 AM, Mas Bejo wrote:
> class AnggotaController < ApplicationController
> # GET /anggota
> # GET /anggota.json
> def index
> @anggota = Anggotum.all
>
> respond_to do |format|
> format.html # index.html.erb
> format.json { render json: @anggot
class AnggotaController < ApplicationController
# GET /anggota
# GET /anggota.json
def index
@anggota = Anggotum.all
respond_to do |format|
format.html # index.html.erb
format.json { render json: @anggota }
end
end
# GET /anggota/1
# GET /anggota/1.json
def s
On Fri, Dec 14, 2012 at 9:58 AM, Mas Bejo wrote:
> i try to add this syntax
>
> set_table_name "member"
>
> in member.rb at folder app\models\
>
> but same as before it can't show record in table member, and i try to
> click new member, i saw this error
>
> "ActiveRecord::StatementInvalid in Memb
i try to add this syntax
set_table_name "member"
in member.rb at folder app\models\
but same as before it can't show record in table member, and i try to
click new member, i saw this error
"ActiveRecord::StatementInvalid in MemberController#create"
and this error
app/controllers/anggota_cont
On Fri, Dec 14, 2012 at 9:33 AM, Mas Bejo wrote:
> did you mean add this syntax
>
> set_table_name "member"
>
> in app\models\member.rb??
>
> i have been try it, but it didn't work..
>
well just saying it didn't work won't help you at all. describe what
happens and why
you concluded it didn't
did you mean add this syntax
set_table_name "member"
in app\models\member.rb??
i have been try it, but it didn't work..
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group
On Thu, Dec 13, 2012 at 11:22 PM, Mas Bejo wrote:
> I always see, every table in rails given the name of the plural form.
> however I have a table with a singular form. let say my table name
> "member" not "members", could this create problems?
> then the rails command writing table name usually
I always see, every table in rails given the name of the plural form.
however I have a table with a singular form. let say my table name
"member" not "members", could this create problems?
then the rails command writing table name usually begins with a capital
letter and using the singular form.
On Thu, Dec 13, 2012 at 5:38 PM, Mas Bejo wrote:
> i can't understand this command
> "rails g scaffold --migration false"
>
> can you describe it more?
>
if you have a table called comments in your current database, and you want
to generate
the model, controller and views for that table, you ne
i can't understand this command
"rails g scaffold --migration false"
can you describe it more?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to rubyonrails-
On Thu, Dec 13, 2012 at 11:22 AM, Mas Bejo wrote:
> i try open schema.rb, and i saw this code
>
> ActiveRecord::Schema.define(:version => 20121201063411) do
>
> create_table "anggota", :force => true do |t|
> t.string "nama"
> t.text
i try open schema.rb, and i saw this code
ActiveRecord::Schema.define(:version => 20121201063411) do
create_table "anggota", :force => true do |t|
t.string "nama"
t.text "alamat"
t.text "no_telp"
t.datetime "waktu_daftar"
i have been setup database.yml, with same name database that i want to
use.
but then what i should do?
Should i to run "rails generate scaffold"?
let say my command
"rails generate scaffold members name:string email:string" to create
schema??
and then run "rake db:migrate"?
--
Posted via http:/
22 matches
Mail list logo