similar to: scaffold_controller generator

Displaying 20 results from an estimated 11000 matches similar to: "scaffold_controller generator"

2011 Apr 29
1
Custom controller for scaffold generator
Hi, i put my customized controller in lib/templates/scaffold_controller/controller.rb for using in scaffold generation. The problem is that the original controller template is used! Where do i put my custom controller template? Or maybe is this a bug? I''m using Rails v. 3.0.7 (Ruby 1.9.2p180) Thanks in advance, ciao iwan -- Posted via http://www.ruby-forum.com/. -- You received
2010 Nov 08
7
Webrick Failing with Illegal Instruction
I''ve just started a new rails project (3.0.1, ruby 1.9.2 on Mac OS X), and have a few parts of it built out. I''ve just created new controller/views using rails g scaffold_controller Lesson, and then added a route to routes.rb with "resources :lessons" Now, when i go to /lessons, Webrick fails with "Illegal instruction" The controller function getting hit is
2013 Apr 15
4
Rails' scaffold controller generator - should it test json format also?
(Forgive me if this is incorrect, because I recognized this initially as something in Rails 4.0.0.beta1 and have just done a cursory look over the latest generator code.) Noticed in Rails 4 that the test generated for a scaffold controller only tests the html format instead of both html and json:
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 Sep 08
2
rails equivalent to symfony admin generator?
I''m an experienced PHP programmer (don''t know Ruby yet), and I''m playing around with Symfony (PHP MVC framework similar to Rails) and I found myself asking if there''s really any reason to use it over Rails. From what I''ve seen just about every feature in Rails is superior except one very important thing - Symfony''s admin generator. This is
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
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
2008 Nov 05
2
AJAX - REST & nested resources
I''ve created a set of resources, with scaffolds that all work. I then changed one resource to be nested inside another as a one to many relation. This required a little bit of work on the tests, the controllers and the views but it all works. Now I want to go the extra step and have the child resources become updateable inside the parent form. I''ve pushed the formatting of the
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
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
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
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
2006 Feb 16
6
http://127.0.0.1:3000/
Hi, I installed ruby on rail on my windows system. I sucessfully made one database related application. But when i want to execute it, i have to give url like http://127.0.0.1:3000/wedding/ etc. can''t i browse through my browser? 192.168.0.51 is my ip. Another one thing is i never get file named new in my example then also it executes file called new for database inserting ,how it is?
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
2011 Apr 25
30
NoMethodError in Book
I got a following error. NoMethodError in Book#new Showing /home/amrit/boook/app/views/book/_form.html.erb where line #1 raised: undefined method `model_name'' for NilClass:Class The content of _form.html.erb file are: <%= form_for(@post) do |f| %> <% if @post.errors.any? %> <div id="error_explanation"> <h2><%=
2006 May 04
9
Help: wrong number of arguments (0 for 1)
Is it my environment? Is something wrong, cause I thought this should just work? I have a simple table and I created a model and a controller: ruby script/generate controller Restaurant ruby script/generate model Restaurant I edited the controller to this: class RestaurantController < ApplicationController scaffold :Restaurant end I run it and: http://0.0.0.0:3000/Restaurant works fine,
2010 Aug 03
2
Strange error message when rendering the scaffold form
Hello everyone, I am developing my application and I created a scaffold called listas, but when I acess /listas/new I get this error message: NoMethodError in Listas#new Showing /home/rodrigo3n/code/listeiroo/app/views/listas/_form.html.erb where line #15 raised: undefined method `deep_symbolize_keys'' for nil:NilClass Extracted source (around line #15): 12: <% end %> 13: 14:
2006 Feb 27
8
Newbie question - Automatically update _form.rhtml?
Hi all, I''ve got an odd issue. I''m new to Ruby/Rails and have a bit of a silly question. I''m following along with the nice little tutorial here, to get an idea of the system: http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html?page=3 However, I''m running into an issue where the author adds a new field in his database, refreshes the browser and shows
2006 Aug 18
3
Understanding MVC - view customization after using scaffolds
All, I have ordered AWDWR and am anxiously awaiting its arrival. In the meantime I still am playing with ROR using radrails. I have a few questions ... I create a table named customers with the following details: Field Type Null Key Default Extra id int(11) NO PRI auto_increment customer_name varchar(50) NO inbound_retention int(11) NO outbound_retention int(11) NO unix_admin_email
2006 May 09
13
What is the license of generated code?
I''m trying to figure out what the software license would be for code (scaffolds, etc) generated by Rails. Basically, if I set up a Rails project, can or should I be able to claim copyright (and therefore have the ability to license under e.g. GPL) over the files generated by :- - The "rails" command that creates the initial tree of files - The output of "generate