similar to: scaffold usage

Displaying 20 results from an estimated 6000 matches similar to: "scaffold usage"

2006 Mar 23
6
easy scaffold question(s)
I''m doing very well with the Hibbs Rolling on Rails tutorial. I have an easy question for my personal notes. I''m coming up with a simple framework of steps for creating a basic database. It includes the following maxims to make original app creation easy: app_name = MySQL database name SQL_tablename = model_name model_name = controller-name Is this going to work for getting
2006 Jun 26
5
Multiple choice questions scaffold?
Hello all, I''m in my second day of working through the various Ruby on Rails tutorials, I''m already hugely impressed by the potential speed of developing database driven sites, especially via the use of scaffolds. Which brings me on to my first question (apologies if it''s a simple one, but like I said it is only my second day!) I am aiming to develop an application
2006 Jul 16
2
Can scaffold do tall tables instead of wide?
I''m trying to get data in rows instead of columns by default. The default scaffold behavior is to create an initial table layout with column headers along the top. In some cases this creates really wide tables which require horizontal scrolling. Is there a parameter I can use with scaffolding or a hack to get the header cells along the left side of the table instead? I''m
2005 Nov 30
2
Missing scaffold features
Hello everyone, First off, I''m trying to generate a discussion here, not provoke an argument or get people upset. Please bear this in mind if/as you read on... To my mind, there''s 3 missing features from scaffolds that would make them a whole lot more useful. These are: - auto-generation of a drop-down list for inputting/updating has_many/belongs_to relationships between
2009 Mar 15
5
Setting DEFAULT_FIELD_OPTIONS in Rails 2.3
Hi, I''m having some trouble overriding/defining the default_field_options constant without raising a warning. I''ve tried adding the code to do it in an initializer but that produces a warning (because the constant is already frozen), after some googling I found a recommendation to put it in the environment.rb file but that then that throws uninitialized constant ActionView
2006 Jan 12
9
Scaffold shows all attributes altough I use attr_accessible!
Hi all I have a Model like this: class Member < ActiveRecord::Base attr_accessible :username, :email, :first_name, :last_name end I have created a scaffold using script/generate scaffold member members Using the URL localhost:3000/members/edit/1 I can edit all attributes, including created_at, lock_version etc.! But it should only show the attributes I listed in attr_accessible! What
2006 Jun 28
9
Scaffold Issue with Postgres
Hi guys, I''ve been able to successfully install the postgres adapter for a remote database machine to get rails up. My machine is running on Fedora 2. Rails version 1.1.2. Is my yml config correct? I am getting this error when I execute script/generate scaffold service_contents content : exists app/controllers/ exists app/helpers/ create app/views/spiel exists
2006 May 03
5
Multiple Scaffolds
I''d like to create scaffolds for each of the tables in my database, but would like to access them below the path: localhost:3000/admin For example localhost:3000/admin/table1 localhost:3000/admin/table2 Where table1 and table2 would be the controller names respectively, calling their own list.rhtml, show.rhtml, edit.rhtml, etc.. Any recommendations on how/where to
2007 Jun 27
1
Active Scaffold controllers created dynamically at runtime?
Does anyone know how to link Rails'' routes into anonymous controller classes created at runtime (defined with their superclass as ActionController::Base)? I''m trying to create a plugin for all of my projects that dynamically creates an active_scaffold controller for each model. It would essentially be like a scaffold_all_models for active_scaffold. I believe the original
2006 Aug 06
4
DRY Scaffolds
I''ve got 8 scaffolds, each one can be considered an ''item'', such as a blog, photo, etc. Using login_engine and user_engine, I list all blogs belonging to a user by saying: @user=session[:user] @blogs=@user.blogs.find(:all) but then let''s say I want to create an option where I want to slice it differently: @user=session[:user] if @someOption ==1
2007 Nov 21
4
Scaffold: What's the advantage of actions create/update?
Hi all I''m quite unsure what''s the point to have a create and update action in the Rails scaffolds... I guess the developers had good reason to implement them, but I don''t really see the reason for them... Why no just checking for get/post within the same new/edit method? def new unless request.post? # do the normal "new" stuff else # do the
2008 Jul 01
8
Scaffolding: Create, Edit, Destroy in admin area
Hi Community, I''m currently trying to create a blog software in rails, but I''ve got a problem: I generated scaffolding for my articles and only want administrators to write, edit or delete articles. So I wanted to move this parts to another, secured controller. The one controller to display articles is called articles :), the other is also called articles, but is located in a
2008 May 04
1
scaffolding with namespace
Hi, is there a way to scaffold with namespace? I''d like to generate a Posts model with namespace admin. But using script/generate scaffold admin/post title:string the migration would generate a table "admin_posts". So I did now script/generate scaffold post title:string moved the controller, views manually to admin/... and had to change each link manually from (e.g.)
2006 Jul 28
2
Scaffold and Undercores in Tablenames
I am attempting to generate scaffolds on legacy tables that have underscores in the name. Scaffold does not see the underscore. I have tried a backslash escape but it no work. I have looked around but i cannot find a way to make it work. It''s like this: c:\railroad>ruby script/generate scaffold FOO_BAR exists app/controllers/ exists app/helpers/ create
2009 Mar 16
4
Overriding ActiveRecord associations for special cases
Hi, Does anyone know a good way to override AR associations to take special cases into account. My current take is the example below which allows the ''root'' user to access all products, but only works if I remember to call it with a .all/.find or similar method: ''user.products.all'' instead of ''user.products''. Ideally I guess I want to return a
2006 Aug 13
5
Newbie question: scaffold not working
I went through a tutorial at http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html?page=1 to get started with RoR. I really like the idea of the scaffold construct, but I can''t seem to get it to work the way it was described in the tutorial. I''ve got a mysql database that is properly configured, and a table called ''quotes'' with a column called
2008 Jul 09
11
script/generate scaffold user
NameError in UsersController#index uninitialized constant UsersController::User RAILS_ROOT: C:/RailsApps/rgams Application Trace | Framework Trace | Full Trace c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:492:in `const_missing'' app/controllers/users_controller.rb:5:in `index''
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 Mar 17
1
edge - scaffolds now pluralized?
Are my eyes going buggy, or did something recently change in Edge Rails so that now scaffolds are generated with pluralized controller/ helper/etc names? I peeked at the code in railties/lib/rails_generator/generators/components/scaffold/ scaffold_generator.rb around line 50, and it looks like there was a change there recently so that it now defaults to pluralized names. So why was this
2008 Sep 02
6
Scaffolding
Hello everyone, Does scaffold still work in the new rails 2.0? Thank you, --~--~---------~--~----~------------~-------~--~----~ 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to