similar to: merging models/views with scaffolding

Displaying 20 results from an estimated 10000 matches similar to: "merging models/views with scaffolding"

2006 Mar 28
5
combining two models in one controller/view "set"
I''m going to take another stab at this question (my first one received no replies): I have two models: Author has_many: books Book has_one: author I have two tables: authors id ... books id author_id ... I let the scaffolding fly and it created the CRUD goodness for each model, as expected. However, I want to have only one view/controller "set" for both models; when I
2006 Aug 02
0
Updating scaffolding to better fit Resources
Now that were designing are controllers to just be CRUD, scaffolding makes a lot of sense (DHH must of had this planed from the beginning). The current scaffolding should be modified to better fit Resources. Scaffolding doesn''t need to be redone, it just needs a few tweaks. I''ve already started converting the scaffold method. I made a plugin, but it still needs some work.
2006 Mar 03
2
newbie scaffold question
I''ve got a database with several tables. I''d like to create scaffolding for separate CRUD interfaces for several of these tables. I''m hoping that the scaffold generator can create the CRUD code for all these tables in ONE controller, but I don''t know how to tell it to do that, if it can. Can anyone verify if this is possible? Thanks, David -- Posted via
2006 Mar 01
7
Instant Management Frontend with the Scaffolding Extensions Plugin
I''ve updated the Scaffolding Extensions Plugin[1] recently to add a couple new features: 1) Scaffold all models and associations with one command 2) Show all associated objects on the edit page Example of usage: In an existing Rails application, create a controller (i.e. "script/generate controller crud"), and modify so it looks like: class CrudController <
2006 Mar 23
2
Question About Scaffolding for My First Rails App
When using ruby to generate scaffolding, is there an easy way to add features that would be useful for keeping track of has_many and belongs_to relations? For example, suppose I have the following: Users Sites Pages Modules Each user has many pages, each site has many pages, each page has many modules, and also the belongs_to relation holds in the opposite order. I''m using the
2010 Jul 04
3
Generated By handling CRUD Scaffold
Good afternoon. I have two questions: First question: Can be defined at the time that I''m generating the scaffold the size of a string? For example name:string (50)? Second question: I wonder how to proceed correctly to include new fields starting at a CRUD generated by scaffold. Example: First step (I use): script/generate scaffold User name:string login:string Second step (I add
2006 Jul 27
0
CRUD, REST and associations
Let''s say I have the model class Reader and Magazine, connected by join model Subscription. It looks something like this class Reader < ActiveRecord::Base has_many :subscriptions, :dependent => :delete_all has_many :magazines, :through => :subscriptions validates_presence_of :name end class Magazine < ActiveRecord::Base has_many :subscriptions, :dependent =>
2006 Apr 21
2
me.defeated!
Good afternoon (as appropriate ; ) I''m having a problem and thought I''d run it past these forums to see if there even was a reasonable solution to it. I''m trying to set up a rails application to pull data from a legacy database. The trick is, that the database really wasn''t created with RoR convention over configuration in mind. The trick is that every
2006 Jan 27
6
Scaffolding to use has_many and belongs_to ?
What does everyone on this list think about enhancing scaffolding somehow so that a "has_many" relationship will automatically drop the <select> box into the view to reference the "belongs_to" part of the view? I think scaffolding is great but I am always adding the <select> boxes to reference the parent association. Do you think this would be useful? just a
2006 Jul 04
0
Multiple and nested controllers or routing
Hi, I''m new to Ruby and Rails and I''m making a simple application to help me learn how to use it. At the moment I have an admin controller. When the user goes here I want them to be presented with 3 choices: manage photos, news and pages. From there I want them to be able to CRUD each type. At the moment in the admin controller I''ve defined actions "photo",
2006 Apr 07
0
Dynamic Scaffolding vs. ScaffoldGenerator
I asked this question before, but didn''t get any response. I hope someone can give me some clue now. Here''s the background, I upgraded to rails 1.1 and suddenly I was getting strange failures in my functional tests. I traced the problem to dynamic scaffolding. I had overwritten all of scaffold''s methods in my controller (all but show and destroy). Destroy no
2006 Feb 06
0
Scaffold for AWS (webservice)?
Hi, Have I missed there being any (extra) scaffold capability in ActionWebService (AWS)? I know about web_service_scaffold placed within a Controller class, which generates WS functionality based on the Api. But might there somewhere be a means to get AWS generation of Api and Controller code that automatically exposes all an ActiveRecord model class''s CRUD member operations as
2006 May 19
4
Lookup tables and scaffolding
It occurs to me as a missing feature that there''s no way to indicate a lookup table relationship (as opposed to other sorts of foreign key relationships) in Rails and that the scaffolding generator could recognise this lookup and render a drop-down list automagically for the lookup table. Say you have an Address and a State, and the State is a lookup table. In addresses you have
2006 Apr 20
1
generate scaffold not generating views
Hi! Sorry for the newbie question... I''m following the depot example in AgileWebDevelopmentWithRails. Stangelly, generating scaffolding using the command (page 53): ./script/generate scaffold Product Admin does not generate any .rhtml file, but just: exists app/controllers/ exists app/helpers/ exists app/views/admin exists test/functional/
2006 Feb 13
0
using Scaffolding Extensions plugin
After I downloaded this plugin, I am not sure how to use it. According the doc: Generally, the scaffolding extensions are used in same way as the normal scaffolding. Inside a controller, run the command: scaffold :album But I tried to run scaffold :control_name, (I have table in the database) in the app/controller, the system says " scaffold: command not found" Suggestion? Thanks in
2007 Dec 10
15
Scaffolding for pre-existing database table in 2.0.1
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 deal with the creation of both the app and the database. Now my problem is that I already have a database with a fair amount of
2006 Feb 26
0
error Before updating scaffolding?
Hello all, I am a bit hung up. I have created a simple table (pluralized) named aircrews and I have edited my database.yml file to point to the database that I created and that is holding the table aircrews. I have gone through the depot tutorial in the Agile book and when I have run the scaffolding command for the depot app all has worked fine for the table products. Now when I run the ruby
2006 Jan 18
3
Documentation for scaffold / views
Apparently a scaffold creates at least one instance variable for views to use, and if I override the scaffold then I must also explicitly create that instance variable for the view. I''d like to know exactly what work is performed by the scaffold so that I can know this when over-riding the view. (OR, is it that the controller makes these variables available by default?..) EXAMPLE:
2006 Feb 13
2
Scaffolding
So what is "best practice" using scaffolding and then manipulating it to work for you or starting from scratch? Thanks. Seth -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060213/0f16d567/attachment.html
2006 Jul 28
8
Building a Search Page as part of CRUD
I''ve been experimenting with Rails over the past couple of days and have come across something that seems harder than it should be. In previous frameworks I have used (WebObjects, php) a full search page (which leads into a list view populated with search results) was part of the CRUD that was either dynamically or statically created after specifying table/object schema. In