search for: admin_control

Displaying 20 results from an estimated 75 matches for "admin_control".

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
2005 Dec 29
8
First module gives "unknown action"
Hi, I''m using "Agile Web Dev. w/Rails", which is great but has a minimum on grouping controllers into modules. I''ve successfully generated a module scaffold, so I have: app/controllers/admin_controller.rb app/controllers/admin/things_controller.rb (And the rest of the scaffold output, which seems normal.) However, browsing to http://localhost:3000/admin/things/ gives me "Unknown action No action responded to things". I''m not sure what or how much code I should post to il...
2006 Jan 08
9
URL/Site structure
Greetings, I''m fairly noob with rails and making my first DB driven site with it. I''m using the scaffold generator to develop the admin side of my site (admin_controller) I have three sections that I want to have the administrator edit, and I want to call these from the admin controller that has a layout with navigation to these three sections. When using the scaffold generator, it obviously generates the news_items controller, and puts in the associated me...
2006 Jun 05
1
file_column permissions
...n/lib/file_column.rb:30:in `init_options'' #{RAILS_ROOT}/vendor/plugins/file_column/lib/file_column.rb:28:in `init_options'' #{RAILS_ROOT}/vendor/plugins/file_column/lib/file_column.rb:618:in `file_column'' #{RAILS_ROOT}/app/models/entry.rb:2 #{RAILS_ROOT}/app/controllers/admin_controller.rb:12:in `list'' #{RAILS_ROOT}/app/controllers/admin_controller.rb:3:in `index'' -- Posted via http://www.ruby-forum.com/.
2007 Aug 17
1
Scaffold (Agile Web Development With Rails)
What am I doing wrong here? [app/controllers/admin_controller.rb] class AdminController < ApplicationController before_filter :authorize def index list render :action => ''list'' end # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html) verify :method => :post, :only => [ :destroy,...
2005 Dec 21
1
Table called applications - causes stack overflow?
...:52:in `constantize'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.11.1/lib/action_controller/pagination.r b:186:in `paginator_and_collection_for'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.11.1/lib/action_controller/pagination.r b:124:in `paginate'' #{RAILS_ROOT}/app/controllers/admin_controller.rb:8:in `list'' #{RAILS_ROOT}/app/controllers/admin_controller.rb:3:in `index''
2006 Feb 13
2
categories and admin/categories - different controllers and templates?
Is there some way to have these two sets of URLs use totally different controllers and templates? categories/list categories/show/1 admin/categories/list admin/categories/edit/1 admin/categories/destroy/1 admin/categories/update/1 Besides, of course, using different controller names ;). The first URL is publicly accessible, while the second contains admin functions. Also, with the second,
2006 Feb 09
2
postgres connection problems
...ection_for_pagination'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/pagination.rb:188:in `paginator_and_collection_for'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/pagination.rb:124:in `paginate'' #{RAILS_ROOT}/app/controllers/admin_controller.rb:8:in `list'' #{RAILS_ROOT}/app/controllers/admin_controller.rb:3:in `index'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/postgresql_adapter.rb:23:in `connect'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/...
2006 Aug 17
6
NameError in AdminController#index building scaffold
...test/unit/users_test.rb create test/fixtures/users.yml identical app/views/admin/_form.rhtml create app/views/admin/list.rhtml create app/views/admin/show.rhtml create app/views/admin/new.rhtml create app/views/admin/edit.rhtml create app/controllers/admin_controller.rb create test/functional/admin_controller_test.rb create app/helpers/admin_helper.rb create app/views/layouts/admin.rhtml create public/stylesheets/scaffold.css Looks like no problem, but then I check the page: NameError in AdminController#index uninitialized con...
2005 May 27
2
undefined method `>' for nil:NilClass
...t model: protected def validate errors.add(:price, "should be positive") unless price > 0.0 end When I attempt to add a new product, I''m getting an error: undefined method `>'' for nil:NilClass /app/models/product.rb:11:in `validate'' app/controllers/admin_controller.rb:21:in `create'' ./script/server:48 (This is on page 60 of the book). The only thing I did differently from the book is use Sqlite3 instead of MySQL. Everything was working until that ''errors.add'' line. I know there''s a place for bugs about the book (if th...
2005 Nov 09
3
AJAX form Parameters jumbled.
...--------- TypeError in Admin#search cannot convert nil into String RAILS_ROOT: ./script/../config/.. Application Trace | Framework Trace | Full Trace #{RAILS_ROOT}/app/models/member.rb:54:in `+'' #{RAILS_ROOT}/app/models/member.rb:54:in `search_for'' #{RAILS_ROOT}/app/controllers/admin_controller.rb:16:in `search'' Request Parameters: {"jim"=>"", "_"=>""} ----------------------------------- Any advice? - Jim
2009 Oct 15
5
invalid multibyte character error
Hi. When I try to use multibyte characters in my rails controller I get an invalid multibyte characters error (<rails_app>/app/controllers/admin_controller.rb:6: invalid multibyte char (US-ASCII)). Here is my controller: contoller AdminController < ApplicationController def read @title = ''Заголовок страницы'' end end Here is my haml template extraction: ... %title= @title ... After I start the WEBrick server and go...
2006 Jun 14
5
uninitialized constant error after scaffold on new Windows XP environment
...in `constantize'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/pagination.rb:194:in `paginator_and_collection_for'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/pagination.rb:129:in `paginate'' #{RAILS_ROOT}/app/controllers/admin_controller.rb:12:in `list'' #{RAILS_ROOT}/app/controllers/admin_controller.rb:3:in `index'' -e:4:in `load'' -e:4 c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:123:in `const_missing'' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/...
2008 Jan 18
15
scaffold :product missing in Rails 2.0.2 version of depot tutorial?
...ted to repeat the tutorial, and got this strange behavior. I used "rails depot --database=mysql" because I have not installed sqlite3 I followed the instructions on pages 59 through 67 carefully, and checked that the products table was created correctly. I then added the scaffold line in admin_controller.rb (see below) # admin_controller.rb (code from example) class AdminController < ApplicationController scaffold :product end and then, started WEBrick, went to the browser and typed "http:// localhost:3000/admin/" and got the following dump in the browser window. NoMethodError...
2006 May 25
7
Grouping controllers
I''m grouping controllers to avoid cluttering the top-level namespace. First, I used script/generate Admin::Customers new edit show list and then I used script/generate Admin::Providers new edit show list. The generator created the subfolders correctly: I have an admin folder and inside there''s customer_controller.rb and provider_controller.rb. I have the same structure in
2006 Aug 13
0
Controller Inheritance/Namespacing
Hi all, Just a quick one... I created an admin controller which I want to use as a hub for admin tasks.... I then did: ruby script/generate controller admin::articles Now I can only access actions from admin/articles_controller.rb if there is no /admin_controller.rb... if I create the admin_controller and go to: /admin/articles/list I get the unknown action response. Any ideas what is going on there? it seems that having the parent controller file stops rails looking for actions in my sub-controllers... Thanks Stuart -- Posted via http://www.r...
2006 Jun 02
2
I need help with my 1st sortable list!
...ing an item is working but dropping and updating the list gives me this error - NoMethodError in AdminController#sort You have a nil object when you didn''t expect it! You might have expected an instance of Array. The error occured while evaluating nil.each #{RAILS_ROOT}/app/controllers/admin_controller.rb:171:in `sort'' # My view - <ul id="price"> <% @prices.each do |@price| %> <li id="price_<%= @price.id %>"> <%= @price.service %> <%= @price.price %> </li> <% end %> </ul> <p id="list-info&qu...
2006 Apr 10
1
routing
...asons: http://mysite.com/admin/some_action it gets routed to the undefined action admin in default_controller with id some_action. How can I correct this so that http://mysite.com/some_action is routed to to default_controller/some_action and http://mysite.com/admin/admin_action is routed to admin_controller/admin_action ??? Please help me! Daniel -- Posted via http://www.ruby-forum.com/.
2006 Jan 30
2
Modules, controllers and inheritance
Hi! I was trying to cleanup my app and I runned into quite a problem. My controllers in submodule do not seem to inherit things from base class. I have following setup: app/controllers/ application.rb: class ApplicationController admin/ admin_controller.rb: class Admin::AdminController < ApplicationController include LoginEngine include UserEngine before_filter :authorize_action # method defined by LoginEngine homepage_controller.rb class Admin::HomepageController < Admin::AdminController Now when...
2006 Aug 04
2
observe_field for radio_button
Hi, I need to observe a set of radio buttons but am having great trouble. My observe_field looks like this: <%= observe_field :user_select, :frequency => 0, :url => { :action => :admin_control } %> Now it works fine if I use a text_field like this: <%= text_field :user, :select, "size" => 20, "maxlength" => 16 %> But I want a radio button, and what I have is this: <%= radio_button("user", "select", user.id) %> The above do...