similar to: Intercepting scaffold functions

Displaying 20 results from an estimated 80000 matches similar to: "Intercepting scaffold functions"

2008 Jan 18
1
Announcing: Ext Scaffold Generator Plugin for Rails
The Ext Scaffold Generator Plugin can be viewed as a drop-in replacement for Rails'' standard Resource Generator. Accepting the very same options, it will generate views using data grid and form components from the Ext JS Javascript GUI framework as well as a controller acting as an Ext-compatible JSON web service. The generated code can be used as a starting point for further
2007 Jun 25
1
Functional tests and active scaffold: unexpected assertion failure.
Hello, I''m writing a functional test for a controller that uses active scaffold. def test_presence_of_field login_as(:peter) profile = Profile.find :first get :edit, {:id => profile.id} assert_response 200 assert_select "textarea#record_free_text_ec" end I was expecting the first ''assert 200'' to give me a green bar, but added it for
2006 Jan 15
2
scaffold suddenly pluralizing names
I haven''t updated rails today and all of a sudden scaffold is pluralizing my names ruby script/generate scaffold Admin::Category produces class Admin::CategoriesController < ApplicationController Do I really want "CategoriesController" instead of "CategoryController"? Thanks, Peter
2012 Mar 01
1
help stylesheet_link_tag
I was reading the book "Agile Web Development with Rails 4th Edition". In Chapter 11, Iteration C2: Adding a Page Layout 1 <!DOCTYPE html> - <html> - <head> - <title>Pragprog Books Online Store</title> 5 <%= stylesheet_link_tag "scaffold" %> - <%= stylesheet_link_tag "depot", :media => "all" %> - <%=
2006 Mar 31
18
Modelling Foreign Keys
Can someone point me to a reference or tutorial that shows how to map foreign key relationships in the model? For example given: Users id name email Posts id user_id title How do I associate user_id with users.id in the Post and User models? has_many and belongs_to don''t seem to do it. -- Posted via http://www.ruby-forum.com/.
2006 Mar 29
4
Scaffold generator: create vs. new
Can anyone supply me with a simple, succinct explanation of what the difference is between the "new" controller and the "create" controller that the scaffold generator produces? I run: > script/generate scaffold modelname controllername And now I need to do some work inside the controllername.rb file. For example, pulling a list from another database table to supply
2006 Jan 06
0
scaffold code fails functional test?
I have the following scaffold generated code which does not run. It does not even hit the breakpoint. def create breakpoint() @student = Student.new(params[:student]) if @student.save flash[:notice] = ''Student was successfully created.'' redirect_to :action => ''list'' else render :action => ''new'' end
2006 Apr 06
3
scaffold question
there are some things on a scaffold that i would like to use without the whole thing. is it better to generate one and then cut it down to only what you''ll use? are all of the things in a scaffold available to just build by hand? for instance, i have a scaffold for my users. in the list action, it has @user_pages, so that you can put @user_pages.current.next or something like that -
2006 Jun 07
2
script/generate scaffold pluralizes class names
Hi everyone, I''m a rails & ruby nuby, and this is my first post to the list. Here''s my environment in case it helps diagnose my problem: Ruby version 1.8.4 (powerpc-darwin8.6.0) RubyGems version 0.8.11 Rails version 1.1.2 Active Record version 1.14.2 Action Pack version 1.12.1 Action Web Service version 1.1.2 Action Mailer version 1.2.1 Active Support version 1.3.1 I did
2006 Jun 21
0
Scaffold error
Hoping someone call tell me what I''ve done wrong. I was attempting to create a "static" scaffold (already have the dynamic one) and received an error message: "error Before updating scaffolding from new DB schema, try creating a table for your model (Company)" I already created a scaffold for Company (class CompanyController). I want to create some better views.
2006 Jun 12
3
Weird problem related I am having with scaffold
i, I have this in expense_controller.rb: class ExpenseController < ApplicationController scaffold :expense end It works fine, but let''s say I want to override scaffold''s list. For some reason, just making list.rhtml in views\expense is enough, and there''s no need to add def list end in expense_controller.rb. However, that''s not my real problem. Now
2006 Mar 01
5
scaffold.css and Rails tutorial problem
In iteration D.1 on page 109 I am not getting a styled error message box displayed at the top of the checkout as described in the tutorial and I cannot seem to discover where I have erred. The scaffold.css is copied from the pragmatic programmers site: #-------------------------------------------------------------------- $ cat public/stylesheets/scaffold.css body { background-color: #fff;
2006 Aug 13
0
Problem generating scaffold using modules
I am trying to create an Admin module that has multiple controllers. For each of the controllers, I would like to use scaffolding to generate the initial models, views, and controllers. I created the admin controller using "generate controller Admin index". This created app/controllers/admin_controller.rb and app/views/admin/index.rhtml. When I point my browser to localhost/admin,
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:
2008 Feb 01
1
Rails routing and active scaffold fight to the death
Just kidding, it''s not as bad as it seems. Right now I don''t have much in my route.rb, and I''m getting this in my console: Processing ApplicationController#index (for 127.0.0.1 at 2008-02-01 14:54:00) [GET] [2008-02-01 14:54:00] (552) INFO Session ID: a8eeb58764d872bbd1fdb337636e68e7 [2008-02-01 14:54:00] (552) INFO Parameters: {} [2008-02-01 14:54:00] (552)
2006 Apr 24
3
quick q on script/generate scaffold
I want a scaffold to manager both products and users. To get the products scaffold I used script/generate scaffold Product Admin if I use, script/generate scaffold User Admin will it overwrite my product admin controller? Would I be better off doing script/generate scaffold User User_Admin or something? -- Posted via http://www.ruby-forum.com/.
2006 Jun 29
0
Ajax Scaffold for a application started using win32-process module.
Hi, I have an RoR application(parent) which is use to kick off other RoR applications(ajax scaffold based). I use win32-process Open4.popen4() to start the RoR applications. Untill recently I was using normal scaffold feature of Rails, and recently I migrated to Ajax Scaffold; After moving on to Ajax scaffold, when I try to start a RoR from my parent RoR, the application do get started, when I
2009 Apr 12
0
Heroku Garden - reversing or changing a 'generate scaffold' command
In Heroku Garden, is there a way of reversing or changing a ''generate scaffold'' command? I often find I need to make changes to the scaffolded application but I do not know how to. ''script/destroy scaffold Modelname'' from the console doesn''t seem to work. For example, I generated a Product scaffold in Heroku Garden. When I try to destroy it using the
2006 Apr 07
1
Help... Ajax scaffold problems
Hi all, Any help is appreciated. I used the ajax scaffold generator to make 3 scaffoldings. Then I put them together as components in a combined layout and created a master controller, which happens to be named "dataentry''. That works fine. Within each of the components, I was able to set up links that paginate and update the div (for the component) with correctly paginated
2006 Jul 18
2
Scaffold a Plural table w/ No Pluralization in environment
Hi guys, I have a situation here. I have my project set to no pluralization due to legacy tables in environment.rb. Now, I have some new tables which I''m starting to pluralize. When I do a generate a scaffold to this new table: script/generate scaffold my_tables table it seems to work out fine for certain sections like http://mysite.com/railsapp/new (which also inserts properly to