similar to: Problem with model and controller dir having same name?

Displaying 20 results from an estimated 20000 matches similar to: "Problem with model and controller dir having same name?"

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
2006 Apr 28
9
[AWDR] Tutorial in A4 wont ''destroy'' items
Hello, I''m working through the tutorial, and I''ve run into a little snag. In the first part of the tutorial, the destroy link is not working correctly. I can''t figure out where I goofed. Removing :confirm doesn''t seem to resolve the issue. Thanks, Randy. development.log ----->8----- Processing AdminController#destroy (for 127.0.0.1 at 2006-04-27
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 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
2007 Jun 11
2
Testing create in Rails controller
Hi All So I am a first-time caller ;-) ... and have been trying to apply RSpec to the depot example in Dave Thomas'' book as I build the application. I am having a problem testing the admin controller create method and cannot quite see where I am going wrong so was hoping for a pointer :-) My spec looks like: describe AdminController do before(:each) do @product =
2006 Jun 05
1
file_column permissions
this is getting frustrating... i installed file_column without a hitch for the first time to just play around with. using the exact same steps as before, i try to use it with one of my actual applications, and i get "permission denied" errors. i figure there might be some conflict with my application so just for kicks i do the exact same thing i did the first time to test
2007 Jan 19
9
werid error, please help
Hi all, I updated to Rails 1.2.1. However, when I tried to access the URL http://localhost:3000/ i get this Application Error Change this error message for exceptions thrown outside of an action (like in Dispatcher setups or broken Ruby code) in public/500.html I removed the default index.html and route it to Account controller. If you read the log below, it seems that the AccountController is
2006 Apr 20
8
2 layouts per .rb page
Hi, Is this possible ive got layout "loggedout_layout", :only => [:login, :logout] but I also want to do somthing like layout "loggedin_layout", :except => [:login, :logout] When the second one is introduced it seems to cancel out the first request, any suggestions how to get around this? Scott -- Posted via http://www.ruby-forum.com/.
2006 Mar 24
2
ajax redirection
Hi, Is there a simple way to redirect towards another page (controller, action) when using form_remote_tag ? I used it tipically to check fields of a account login form. I''d like if the user exists, he''s redirected towards another page, otherwise I display some error div''s. Any ideas ? Thanks a lot. Seb
2008 Jan 18
15
scaffold :product missing in Rails 2.0.2 version of depot tutorial?
I am getting an error when I try to run the code for the depot application (page 67 in the Agile Web Development on Rails book, 2nd edition). I built the complete depot app with Rails 1.2.6, and all worked well. I then updated to Gem 1.0.1 and RoR 2.0.2, and attempted to repeat the tutorial, and got this strange behavior. I used "rails depot --database=mysql" because I have not
2006 May 25
1
AppMailer and McCray''s theme generator
Hi, I am using Matt McCray''s theme generator. http://rubyforge.org/projects/theme-generator/ Everything works fine, but rendering an action in a controller using the AppMailer raises this: undefined method `current_theme'' for #<AppMailer:0x39df950> Is there someone who could help me ? Thanks ! Mickael. Traces:
2006 Aug 17
6
NameError in AdminController#index building scaffold
I''m a pretty big newbie with ROR, but when following a tutorial I encounter an ugly error when building a scaffold. Here is my environment Dev system: - Windows XP - java version "1.5.0_06" - MySQL java version "1.5.0_06" - Ruby 1.8.4 - Ruby Gems 0.9.0 - Gem install mysql Successfully installed mysql-2.7.1-mswin32 Installing ri documentation for
2006 Jun 02
2
I need help with my 1st sortable list!
Ill keep it brief. Dragging 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
2006 Apr 21
1
Catch authentication result from a model in a controller
Im still following the authorization recipe from the book, now all works fine but im getting trouble in how handle the model authorization result, if the user and pass are correct, it goes to a welcome screen(admin.rhtml) but if wrong the model prints a message in an ugly exception like page "usr and pass not correct", i want to redirect the user to the login
2006 Apr 27
7
Role Based Authorization recipe implementation?
i got the rails recipes book, i have now an auth system for users without problems, now i want to made a role based acces for my app, im following the "Role Based Authorization" recipe of the book but i cant make it to work even when the tables created and correctly added data manually definig the roles and rights. als i dont know how to define a right for use all the actions in a
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 Jul 07
13
Rails Recipes Book: Authentication
Hi, The user/login management system in Chapter 31: Authenticating Your Users and Chapter 32: Authorizing Users with Roles of Chad Fowler''s Rails Recipes looks reasonable and adequate. However, when I ran the Chapter 31 code, I get the following error: Username or password invalid And I am not even given the chance to sign in; that is, the signin form does not appear at all. Has
2006 Jun 04
4
directory structure on typo
i was looking through the typo code and see that all of the administrative controllers and views are placed in another subfolder. i tried just moving the files just for kicks and it didn''t work (didin''t really expect it to, but it was worth a shot.) so how do you set something up like that? i tried looking in the routes.rb file, but i''im not sure what''s in
2007 Mar 31
0
routing problem with controllers in other dirs
Hi all I have a problem with mapping url to controller which is deeper in controller directory (not root directory). I wanted to move acts_as_authenticated account_controller deeper to directory (let''s call it Foo) and route it as /Foo/Account, but i always seem to get exception that no route matched my request file structure: /app +- /controllers +- /Foo +-
2006 Jun 14
5
uninitialized constant error after scaffold on new Windows XP environment
I am attempting to get a working Rails programming environment setup working under XP with MySQL, RadRails and Webrick. I have been using my PowerBook but need to working on Windows environment too. I have basic functions of Ruby and Rails going. I created a really simple table and generated the scaffolding. The server starts just fine. I can browse the database succesfully in RadRails. The issue