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
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
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.
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
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
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
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
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
> 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
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/
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
>
> >
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
> ***
> 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
> **
> 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?',
>
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
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
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.
>
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
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
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
> 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
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
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
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
--
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
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
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
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
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:/
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
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
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/.
--~--~-~--~~~---~--~
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
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
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
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
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
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
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
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
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
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
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
43 matches
Mail list logo