similar to: rename app>controller subfolder crashes app

Displaying 20 results from an estimated 10000 matches similar to: "rename app>controller subfolder crashes app"

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 25
16
case statements in views...strange error on OSX
I have a simple case statement in one of my views. This works fine on my windows machine. Move to the mac and I get: "parse error, unexpected tIDENTIFIER, expecting kWHEN". I have not changed anything but cannot resolve the issue. my view has this in it (simplified for test) <% case controller.controller_name -%> <% when "accounts" -%> <h3>worked
2005 Dec 17
2
Subfolders in Rails applications (newbie)
After about a week playing with Rails, I have built a couple of apps but am still unable to get one thing to work: subfolders. (I am probably using the wrong term here, but oh well...) I would like my rails application to have controllers logically grouped into folders. So for instance: http://domain.com/accounting/accounts http://domain.com/hr/employees Here''s how I have tried to
2006 Apr 03
7
Javascript helpers not updating table row in IE6
Trying to replace a table row with an id using both RJS templates and normal link_to_remote :update. Neither work in IE6, fine in FF etc. If I use the same code but target a div with an ID it works. This is tricky as I have a table with edit buttons, when the button is pressed that row gets updated with a partial containing a form for update. I need this to work as II don''t fancy
2006 Apr 13
3
Why won''t this work - simple helper text ??
Trying to print this out and it fails, def cancel_toggle(element) ''<a href="#" onclick="new Effect.toggle("'' + element + ''","blind", {duration: 0.4}); return false;" >Add a New Client</a>'' end When called in my view like this: <%= cancel_toggle "newClient" %> It gets written to the browser
2006 Mar 24
3
generating a controller that inherits from a base controller
how can I generate a new controller that inherites from another bas controller? using: ruby/script generate myNewController command? -- Posted via http://www.ruby-forum.com/.
2006 Mar 24
3
Changing sidebar in layout per controller
I am currently using 2 layouts in my site. One is for the admin area. I am trying to get content in my sidebar to change depending upon the current controller. Example: Within admin I have a users controller and a articles controller. When in the users view I want the sidebar to display options (like add user delete user etc). What is the best actionview way to do this. I don''t
2011 Jul 21
4
Validation depends on Controller
I know in the model we can add validations. But how about if I need different validations depending on the controller. For example... 1) if the User is being created from the accounts controller, I want to REQUIRE the username be entered. 2) if the User is being created from the users controller, I want to NOT REQUIRE the username. validates_presence_of :username, :on => :create requires the
2005 Dec 28
3
Module loading
I''ve looked high and low for the answer to this and can''t seem to find anything that helps. I have an admin section (much like Typo) where all controllers are based on the Admin::BaseController. My directory structure is [RAILS] -app --controllers ---admin ----base_controller.rb ----products_controller.rb Products controller is: class Admin::ProductsController <
2006 Dec 15
8
Early morning strange error saying: Status: 500 Internal Server Error
So I have updated to the latest mongrel and fastthread and my environment is as follows: Debian 3.1 Rails 1.1.6 Ruby 1.8.5 Mongrel 0.3.18 Fastthread 0.4 Mongrel Cluster 0.2.1 Apache 2.2.3 I again woke up this morning to my disappointment of seeing the strange Status: 500 Internal Server error. It happens the same every morning, I have three mongrels running, two give the error, one
2006 May 24
1
Rails App in Subfolder = Routing Error Recognition Failed
Zed / List, On my workstation I''m running lighttpd 1.4.11 and mongrel 0.3.12.4. Here are my proxy settings: proxy.debug = 0 proxy.balance = "fair" proxy.server = ( "/RailsAppSample" => (( "host" => "127.0.0.1", "port" => 1337 ))) I can access http://localhost/ (default lighty welcome page) and http://localhost:1337/
2006 May 25
0
(OT?) Rails App in Subfolder = Routing Error Recognition Failed
All, I realize this was probably off-topic (not really mongrel-centric) -- my apologies. I "solved" the problem by appending to my Environment.rb: ActionController::AbstractRequest.relative_url_root = "/RailsAppSample" How come that doesn''t serve up the default "public/index.html" ? It caused a Routing Error for "", so I added a temporary
2006 Apr 13
7
Whats the best way to achieve this?
employees HABTM projects, projects HABTM employees. I am doing a permissions page for a selected project. I know that I can get all of the employees in the system (@employee.find(:all)) or get all the employees for the selected project. What i''m trying to do is get a list of all the employees in the system and have a check box that states if they are associated with the current
2006 Feb 19
3
accounts and subdomains
With reference to a previous post:http://www.ruby-forum.com/topic/55201#new I would like my app to function as follows: A new user signs up for my application, his username is "andy". When andy now logs in to the application the url is redirected to : http://andy.myapplication.com Questions: Is this possible to develop on a windows box with webrick? Do I need anything special like
2007 Nov 16
2
[Fwd: pxelinux doesn't suppress common prefix if nothing precedes double colon]
Just a reminder that this remains an issue up to and including the latest syslinux 3.53-pre (0x473cfc9c). Additional testing suggests that implicit hostname/IP has never worked, ever since the common prefix suppression feature was added in version 3.00. -------- Original Message -------- Subject: pxelinux doesn't suppress common prefix if nothing precedes double colon Date: Sat, 25 Aug
2006 Apr 03
4
page.visual_effect :highlight not working
I just upgraded Ruby to 1.8.4 and Rails to 1.1 and I''m in the middle of changing my Javascript code over to the Scriptaculous helper functions. page.visual_effect :highlight, "some_div" seems to be broken. Instead of fading, the background color of the element stays highlighted. page.visual_effect works for other effects, though. Any ideas? Thanks. -- Posted via
2006 Feb 08
3
ungenerate / remove scaffold command?
I have seen this somewhere and can''t find it now. Is there an ungenerate or remove command for the scaffold generator. It would be easier than removing all the files by hand. I have tried ./script/ungenerate but no luck. Thanks -- Posted via http://www.ruby-forum.com/.
2006 Apr 06
2
rails 1.1 - console broken
Have upgraded to rails 1.1 and now ruby script/console does not work. Throws an error: c:\work\development\rails\application1>ruby script/console Loading development environment. c:/tools/ruby/lib/ruby/1.8/irb/init.rb:151:in `parse_opts'': undefined method `up case'' for nil:NilClass (NoMethodError) from c:/tools/ruby/lib/ruby/1.8/irb/init.rb:19:in `setup''
2011 Apr 15
7
warning: toplevel constant XYZ referenced Admin:XYZ
I have an odd problem. I got controllers in a namespace and controllers outside of the namespace. For example, I have a PagesController and a Admin::PagesController. When I run rspec from the top, tests pass and I get the following warning: spec/controllers/admin/pages_controller_spec.rb:4: warning: toplevel constant PagesController referenced by Admin::PagesController This makes no sense. I do
2006 Mar 29
3
partial variable help
Can''t work this out: In list.rhtml: <% for employee in @employees -%> <%= render(:partial => "list_form", :object => employee) %> <% end -%> In _list_form.rhtml (partial): <%= employee.id %> In controller: @employees = Employee.find(:all) I get the following error: undefined local variable or method `employee'' I everything is correct