[Rails] Re: Scaffolding for pre-existing database table in 2.0.1

2014-10-03 Thread Richard Lenawasae
Email Address:richardlenawa...@gmail.com>>>Jason Fleetwood-Boldt @Jasonfb, i guess i did alot of research on ruby on rails as far scaffolding is concern, but you find when it comes on real world boilerplate applications..it's kind of a nightmare when we try oldschool method 'scalfolding' becaus

[Rails] Re: Scaffolding for pre-existing database table in 2.0.1

2014-10-03 Thread Richard Lenawasae
Email Address:richardlenawa...@gmail.com Hi, I'm developing a heavy project using Ruby on Rails, and I already have a big database schema in my sublime text,but my database has a dozen of fields of tables which are sometimes very tiresome when scaffolding such as £rails g scaffold profile first

[Rails] Re: Scaffolding for pre-existing database table in 2.0.1

2014-08-29 Thread Al Rushing
Just another quick solution. You can generate the Ruby scaffolding commands using SQL out of the database. Just access sys.columns or whatever your particular database provides (INFORMATION_SCHEMA or something). For each column, generate that line that Ruby wants for a column / table entry.

[Rails] Re: Scaffolding for pre-existing database table in 2.0.1

2014-08-29 Thread Al Rushing
Sebastian wrote in post #599469: > Hi, > > first of all I will apologize in advance for my presumably noobish > question, but I'm only starting to learn Rails and am a little > confused with all the changes in 2.0.1. There are as good as no > tutorials out yet and the 2 or 3 screencasts I've seen d

[Rails] Re: Scaffolding question

2014-02-11 Thread Phil Dobbin
On 11/02/2014 11:40, Ehtsham Abbas wrote: > Phil, > > To create CRUD application you can use Rails scaffolding which saves > your most of the time instead of coding same stuff yourself. Of-course > its a better approach when something is already build why would you > waste your time on it unless

[Rails] Re: Scaffolding question

2014-02-11 Thread Ehtsham Abbas
Phil, To create CRUD application you can use Rails scaffolding which saves your most of the time instead of coding same stuff yourself. Of-course its a better approach when something is already build why would you waste your time on it unless you have to make it more customizable? Bootstrap b

[Rails] Re: Scaffolding for pre-existing database table in 2.0.1

2012-12-06 Thread Humberto P.
Mr Mapes wrote in post #613756: > Ryan Bigg wrote: >> New way is to specify the fields. >> >> script/generate scaffold person first_name:string last_name:string >> > > I'm considering Ruby on Rails, but I already have a big database schema, > and I'd rather not re-type firstname:string lastname:str

Re: [Rails] Re: Scaffolding working...kinda

2010-08-13 Thread Will Merrell
Scott Le gendre wrote: So use it to get started, but then be prepared to do the work your self. Will, thanks for the comments and fully noted! I'm doing a tutorial through lynda.com titled "Ruby on Rails Essential Training". The tutorial is really great, but severely outdated. The tutori

[Rails] Re: Scaffolding working...kinda

2010-08-13 Thread Scott Le gendre
> So use it to get started, but then be prepared to do the work your self. Will, thanks for the comments and fully noted! I'm doing a tutorial through lynda.com titled "Ruby on Rails Essential Training". The tutorial is really great, but severely outdated. The tutorial goes through building all

[Rails] Re: Scaffolding working...kinda

2010-08-12 Thread Scott Le gendre
anon_comp wrote: > On Aug 12, 3:36�pm, Dave Aronson > wrote: >> > �has_many :albums >> > Regenerate the scaffold. I believe you're following an old tutorial, > scaffolds are a lot simpler than trying to attach tables together and > hoping they'll stick. Take note of Colin's comment. > > $ script/

[Rails] Re: Scaffolding working...kinda

2010-08-12 Thread anon_comp
On Aug 12, 3:36 pm, Dave Aronson wrote: > On Thu, Aug 12, 2010 at 15:31, Scott Le gendre wrote: > > >> Did you have a name column in your model? > > > Well, all I have in my model is the following: > > > *** > > > class Artist < ActiveRecord::Base > > >  

Re: [Rails] Re: Scaffolding working...kinda

2010-08-12 Thread Dave Aronson
On Thu, Aug 12, 2010 at 15:31, Scott Le gendre wrote: >> Did you have a name column in your model? > > > Well, all I have in my model is the following: > > *** > > class Artist < ActiveRecord::Base > >  has_many :albums > > end > ***

[Rails] Re: Scaffolding working...kinda

2010-08-12 Thread Scott Le gendre
> Dave Aronson wrote: > Did you have a name column in your model? Well, all I have in my model is the following: *** class Artist < ActiveRecord::Base has_many :albums end *** -- Posted via http://www.ruby-foru

[Rails] Re: Scaffolding working...kinda

2010-08-12 Thread Scott Le gendre
> ** > Listing artists > > > > > > <% @artists.each do |artist| %> > > <%= link_to 'Show', artist %> > <%= link_to 'Edit', edit_artist_path(artist) %> > <%= link_to 'Destroy', artist, :confirm => 'Are you sure?', >

[Rails] Re: Scaffolding

2010-07-03 Thread Mirza Ceric
Yes, you have to create a route for that (see config/routes.rb) Tutorial: http://guides.rails.info/ Regards, Mirza On Jul 2, 8:59 am, Hemant Bhargava wrote: > Hello All, > > I am using scaffolding but i can not figure out that how to write my own > methods except CRUD. I mean i know how to use

[Rails] Re: Scaffolding

2010-07-02 Thread Andre Cubeta
Hemant Bhargava wrote: > Sur Max wrote: >> IMHO, you really need to study the routes and how restful routing >> works. http://guides.rubyonrails.org/routing.html >> Scaffolding must have had generated the restful routing for the said >> controller and thus no other method except CRUD is being enter

[Rails] Re: Scaffolding

2010-07-02 Thread Hemant Bhargava
Sur Max wrote: > IMHO, you really need to study the routes and how restful routing > works. http://guides.rubyonrails.org/routing.html > Scaffolding must have had generated the restful routing for the said > controller and thus no other method except CRUD is being entertained > unless specified. >

[Rails] Re: Scaffolding

2010-07-02 Thread Sur
IMHO, you really need to study the routes and how restful routing works. http://guides.rubyonrails.org/routing.html Scaffolding must have had generated the restful routing for the said controller and thus no other method except CRUD is being entertained unless specified. add your method in the fil

[Rails] Re: Scaffolding oddities -- any ideas?

2010-03-08 Thread RichardOnRails
I got it straightened out. Thanks anyway in case you looked at my now- solved problems. On Mar 8, 12:27 pm, RichardOnRails wrote: > Hi All, > > I’ve got a couple of problems and solutions I’ll try unless I get > guidance for more Rails-like approaches.  Details follow. > > Thanks is advance, > R

[Rails] Re: Scaffolding w/ existing DB Tables

2009-08-10 Thread Wap Addon
Rat King wrote: > I am sure many people have asked this already... But I could not find > anything helpful. I am trying to use RoR with an existing database with > tables already defined. > > I used script/generate scaffold account > > But when I point to localhost:3000/account, no table columns

[Rails] Re: Scaffolding w/ existing DB Tables

2009-08-10 Thread Sijo Kg
> I used script/generate scaffold account > > But when I point to localhost:3000/account, no table columns showed up. > The "new account" link is there, but no columns nor any content (and I > have content in my db table). When I click on new account, only the > create button showed up. When I c

[Rails] Re: Scaffolding w/ existing DB Tables

2009-08-10 Thread Rails List
With scaffolding you can specify the list of fields and its data type. Try again this way... ruby script/generate scaffold Account field1:datatype field2:datatype let me know if it works. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You rece

[Rails] Re: Scaffolding in a sub-directory on Rails 2.x

2009-08-07 Thread James West
Sijo Kg wrote: > Hi > >Not only doing the above solves all..You have to edit a lot of > places. Rather than I explain all these and grab a lot more spaces here > you better read this > Read section Namespaced Routes in > > http://www.akitaonrails.com/2007/12/12/rolling-with-rails-2-0-the

[Rails] Re: Scaffolding in a sub-directory on Rails 2.x

2009-08-07 Thread Sijo Kg
Hi Not only doing the above solves all..You have to edit a lot of places. Rather than I explain all these and grab a lot more spaces here you better read this Read section Namespaced Routes in http://www.akitaonrails.com/2007/12/12/rolling-with-rails-2-0-the-first-full-tutorial Sijo --

[Rails] Re: Scaffolding in a sub-directory on Rails 2.x

2009-08-07 Thread Christian Ricardo Marroquín
Thanks Sijo, I followed your instructions but there's another error I got Routing Error No route matches "/admin/publisher" with {:method=>:get} Do you know a way to get rid of it...?? Thanks 2009/8/7 Sijo Kg > > Hi > you can do like > ./script/generate scaffold Admin::Publisher > >Her

[Rails] Re: Scaffolding in a sub-directory on Rails 2.x

2009-08-07 Thread Sijo Kg
Hi you can do like ./script/generate scaffold Admin::Publisher Here the model be namespaced And if you need only controllers and view you can do it seperately ./script/generate controller Admin::Publisher ./script/generate model Publisher And edit routes.rb map.namespace(:admin) d

[Rails] Re: scaffolding

2009-07-04 Thread Älphä Blüë
Upgrade to the lastest rails (for starters - unless for some reason you cannot).. 2.3.2 All tables are created with an id field so never use that. If you want to create a foreign key that is going to be used by multiple tables you could use something like webblog_id if the webblog_id is goin

[Rails] Re: scaffolding

2009-07-04 Thread Conrad Taylor
On Sat, Jul 4, 2009 at 3:16 AM, Rajendra Bayana < rails-mailing-l...@andreas-s.net> wrote: > > hi , i used the folllwing command to scaffold, > > G:\my\webblog>ruby script/generate scaffold webblog id:integer > title:string body > :text created_at:datetime > > after when i migrate with the follwin

[Rails] Re: scaffolding

2009-07-04 Thread Colin Law
2009/7/4 Rajendra Bayana : > > hi , i used the folllwing command to scaffold, > > G:\my\webblog>ruby script/generate scaffold webblog id:integer > title:string body > :text created_at:datetime > > after when i migrate with the follwing command > > rake db:migrate > > i got the error as > > (in G:/

[Rails] Re: Scaffolding question

2009-06-05 Thread J. D.
Thanks for the information. I have a dual-developing platform (windows and linux) but my host is on linux.. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails

[Rails] Re: Scaffolding question

2009-06-05 Thread Maurício Linhares
That's not really related to the rake task, it's a cron config (i'm guessing that you're on Linux or some kind of OS that has the cron utility). You can google about cron and config it the way you want. Then cron will call your rake task as needed. - Maurício Linhares http://alinhavado.wordpress

[Rails] Re: Scaffolding question

2009-06-05 Thread J. D.
Thanks again Mauricio, I will look into trying this out. Is the rake task able to be defined periodically by a weekday? For instance, if I want the job to only pull data on a Monday (is that feasible)? -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~

[Rails] Re: Scaffolding question

2009-06-05 Thread Maurício Linhares
If crawling through the NCAA website is something that you want to automate, as "crawl daily at 12 pm" you can create a rake task in your Rails application that calls this code and then put the rake task to be run as a cron job: #ncaa_crawler.rake at /lib/tasks rake :ncaa_crawler => :environment

[Rails] Re: Scaffolding question

2009-06-05 Thread J. D.
Maurício Linhares wrote: > The "integer", "string" and "float" methods are just shorthands for > the column call using that type. > > It's also the "new way" (new since Rails 2, not that new now) of > writing migrations. And the "timestamps" will create both a created_at > and also an updated_at

[Rails] Re: Scaffolding question

2009-06-05 Thread Maurício Linhares
The "integer", "string" and "float" methods are just shorthands for the column call using that type. It's also the "new way" (new since Rails 2, not that new now) of writing migrations. And the "timestamps" will create both a created_at and also an updated_at column. - Maurício Linhares http://a

[Rails] Re: Scaffolding question

2009-06-05 Thread J. D.
The first scaffold table should look like this: (not what I posted) class CreateRushingOffenses < ActiveRecord::Migration def self.up create_table :rushing_offenses do |t| t.string :name t.integer :games t.integer :carries t.integer :net t.float :avg t.in

[Rails] Re: Scaffolding Results Format

2009-05-28 Thread Jay Covington
Ar Chron wrote: > Take a look at the in_groups_of method for your list processing in the > view... > > @books.in_groups_of(3) do |group| > start row > group.each.do |book| > start column > book.title + '' + book.abstract > end column > end > end row > end > > or something li

[Rails] Re: Scaffolding Results Format

2009-05-27 Thread Ar Chron
Take a look at the in_groups_of method for your list processing in the view... @books.in_groups_of(3) do |group| start row group.each.do |book| start column book.title + '' + book.abstract end column end end row end or something like that... -- Posted via http://www.ruby-fo

[Rails] Re: Scaffolding Results Format

2009-05-27 Thread Jay Covington
Conrad Taylor wrote: > On Wed, May 27, 2009 at 4:16 AM, Jay Covington < > rails-mailing-l...@andreas-s.net> wrote: > >> Default view (127.0.0.1:3000/books) >> >> >> Book One Book Two Book Three >> Book One Abstract Book Two Abstract Bo

[Rails] Re: Scaffolding Results Format

2009-05-27 Thread Conrad Taylor
On Wed, May 27, 2009 at 4:16 AM, Jay Covington < rails-mailing-l...@andreas-s.net> wrote: > > Hi Everyone, > > I built a scaffold and I'm having trouble getting results properly > formatted. (I need to get the data into multiple columns instead of just > one big column) I can't get all of my CSS t

[Rails] Re: Scaffolding for pre-existing database table in 2.0.1

2009-03-27 Thread Tony Ennis
Mr Mapes wrote: > Ryan Bigg wrote: >> New way is to specify the fields. >> >> script/generate scaffold person first_name:string last_name:string >> > > I'm considering Ruby on Rails, but I already have a big database schema, > and I'd rather not re-type firstname:string lastname:string, for th

[Rails] Re: Scaffolding and dealing with generated actions in the controllers

2008-10-29 Thread Pilaf
Also, try this: http://guides.rails.info/routing_outside_in.html On Wed, Oct 29, 2008 at 7:31 PM, Pilaf <[EMAIL PROTECTED]> wrote: > Just a few guidelines so you can learn the rest on your own: > > Make sure you understand the map.resources method and its > capabilities, and especially read the

[Rails] Re: Scaffolding and dealing with generated actions in the controllers

2008-10-29 Thread Pilaf
Just a few guidelines so you can learn the rest on your own: Make sure you understand the map.resources method and its capabilities, and especially read the part on adding custom actions (through the :collection, :member and :new options of map.resources): http://apidock.com/rails/ActionControll