search for: base_control

Displaying 15 results from an estimated 15 matches for "base_control".

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 < Admin::BaseController end base_controller.rb is: class Admin::BaseController end However I keep getting this error: NameError: Cannot load module Admin: Object::Admin is set to Admin Can anyone help me...
2007 Sep 20
1
undefined method `request' for "products":String ?
...39; vendor/rails/actionpack/lib/action_view/helpers/url_helper.rb:136:in `link_to'' app/helpers/admin/base_helper.rb:19:in `link_to_orderable'' app/views/admin/categories/index.html.erb:10:in `_run_erb_47app47views47admin47categories47index46html46erb'' app/controllers/admin/base_controller.rb:25:in `index'' app/controllers/admin/base_controller.rb:24:in `index'' --- helper def link_to_orderable(name, order, default = false) case params[:order] when default && nil className = "ordered_desc" when order className...
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
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 Jun 08
8
another routes question
i need help setting up the routes for my app. I have created about 10 controllers in the app/controllers/pro directory: app/controllers/pro/address_controller.rb app/controllers/pro/certification_controller.rb app/controllers/pro/program_controller.rb app/controllers/pro/program_controller.rb and so on... The problem is that I would like to also use app/controllers/pro as a controller; so
2006 Mar 07
4
Controllers More Than One Sub-Directory Deep?
Does anyone know how to make Rails aware of controllers that might exist in directories that exist deeper than one level under the app/controllers directory? I initially figured just adding additional scope information might do the trik (i.e. Tabs::Admin::OneController or Admin::Tabs::OneController), but that does not seem to work. I''m guessing that I can just manually add these
2011 Apr 21
1
Rails 3 Foreign Domain routing - cannot get this to work!
...essage => "is taken" def cache_domain self.cached_domain = if self.cname_alias.blank? "#{self.subdomain}.#{APP_CONFIG[:domain]}" else "#{self.cname_alias}" end end [/code] as per the example, my base controller: [code] # app/controllers/personalized/base_controller.rb class Personalized::BaseController < ApplicationController before_filter :get_project protected def get_project @project = Project.first(:conditions => { :cached_domain => request.host }) end end [/code] One thing I noticed, in PersonalizedDomain, was that...
2012 Oct 18
0
unexpected return (LocalJumpError) only when executing this code within autoloaded classes?
.../dependencies.rb:190:in `each'' from /path/to/.rvm/gems/ruby-1.9.3-p194@some_app_gemset/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:190:in `const_missing'' from /path/to/.rvm/gems/ruby-1.9.3-p194@some_app_gemset/gems/activeadmin-0.5.0/lib/active_admin/base_controller/menu.rb:2:in `<module:ActiveAdmin>'' from /path/to/.rvm/gems/ruby-1.9.3-p194@some_app_gemset/gems/activeadmin-0.5.0/lib/active_admin/base_controller/menu.rb:1:in `<top (required)>'' from /path/to/.rvm/gems/ruby-1.9.3-p194@some_app_gemset/gems/activesup...
2012 Oct 17
2
autolog: set_trace_func without all the typing
If it helps anyone developing Rails, apps, or gems, I wrote a shortcut for set_trace_func, so next time you want to just add a line before and after some function you are trying to debug you can have Ruby temporarily output every line, method, etc. executed. Also, it lets you define the format, use other loggers, etc. via a proc/lambda define, since you might not like the default format.
2006 Aug 08
2
Extending rails with plugins
I''ve been looking at bottling some functionality up into a plugin, but I''m having some problems including it. The structure I have is: /app/controllers/admin/base_controller.rb: class Admin::BaseController > ApplicationController #snip# end /vendor/plugins/myplugin/lib/my_module.rb: module MyModule def new_func "New Function" end end /vendor/plugins/myplugin/init.rb: require ''my_module'' Admin::BaseController.send...
2013 Mar 20
2
Rspec + Devise + BaseController
Hello there, I''m creating a base controller for the admin section of a project. All controllers whitin the admin section will inherit from it. ##################################################### #app/controllers/admins/base_controller.rb class Admins::BaseController < ApplicationController layout "admin_cms" before_filter :authenticate_admin! end ##################################################### #spec/controllers/admins/base_controller_spec.rb require ''spec_helper'' describe Admins::...
2006 Jan 03
22
Large-scale application
Hi fellow railers! We are discussing the possibility of writing a very large application in Rails. By "very large" I mean a framework that would contain a few hundred smaller applications that would need to talk to one big database and have to share some common session data I''d like to get some feedback on some possible ways of doing the following: The application would
2006 Mar 27
9
rename app>controller subfolder crashes app
Help, I changed a folder name in my app>controller from admin to company and now I get a company is not a class error. I do not have any custom routes set and have changed all references to admin, no joy. Does ruby / rails have a cache of the names? -- Posted via http://www.ruby-forum.com/.
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/
2006 Aug 01
8
Dumb views?
Hello again! I''ve another "what would you do in this situation" question. You''ve got 6 controllers, one named base. The other 5 controllers extend base. Currently they share one layout. Your layout displays navigation. However, there are two actions inside base for which you do not want navigation displayed (index, new). Do you... a) Add logic to your layout telling