Displaying 20 results from an estimated 800 matches similar to: "namespaced controllers"
2006 Jul 13
3
date_helper megapatch and MultiparameterAssignmentErrors
Hello all,
There''s a great patch in trac that fixes a lof of issues with the
date helpers. I''m afraid it hasn''t had any attention yet.
http://dev.rubyonrails.org/ticket/3811
This fixes all the little date_helper problems, except one: When you
choose an invalid date ActiveRecord throws an
ActiveRecord::MultiparameterAssignmentErrors. This used to work in
1.0,
2006 Jun 28
6
Rails 1.1.3 and routes to controllers in directories
Hi,
All my controllers in subdirectories aren''t reachable by the normal urls
anymore since my upgrade to 1.1.3. 404 errors. Did anybody else
experience this?
grtz
Thijs
--
Posted via http://www.ruby-forum.com/.
2006 Mar 09
4
Stop users accessing methods.
Hello all.
Is there a way to stop users from being able to access a controllers
methods without affecting the ability of other controllers to use them?
i.e
FooController
def secret
#Stuff
end
end
BarController
def index
redirect_to :controller => ''foo'', action => ''secret'', :id => ''007''
end
end
But directly
2007 Feb 07
3
Upgrade to Rails 1.2.2 : RESTful routes not working anymore
Hello,
I just upgraded my app to Rails 1.2.2.
My routes are :
map.with_options :path_prefix => "/admin", :name_prefix => "admin_" do |m|
m.resources :requests, :controller => "admin/requests", :collection => {
:destroy => :delete, :search => :post } do |request|
request.resources :histories, :path_prefix =>
2007 Aug 31
2
Can module spec "behave like" controller spec?
Hello everyone:
Right now I am writing spec on modules, which are provided by my
colleagues. Some of the modules actually contain action methods. I tried
very hard to spec those action methods in modules. But it seems that the
rspec does not allow module spec to ''get'' action like controller does. After
I saw the documentation, I then used :behaviour_type=>:controller.
2011 May 25
1
warning: toplevel constant SomeController referenced by Admin::SomeController
This issue has been discussed before (http://www.ruby-forum.com/topic/
125392) and after spending a while debugging through this, I still
don''t have a solution. Lets try again?
I have two controllers, SomeController and Admin::SomeController. When
SomeController is loaded first (which happens under spork, found out
by editing ActiveSupport::AbstractController) I get warning: toplevel
2006 Mar 07
17
Handling Erros from AWDWR
I''m getting to the point now where I really need to start trapping the
errors.
So from my AWDWR book, I added the following directly from the book into
application.rb...
def rescue_action_in_public(exception)
case exception
when ActiveRecord::RecordNotFound, ActionController::UnknownAction
render(:file => "#{RAILS_ROOT}/public/404.html",
2006 Feb 08
2
NameError (uninitialized constant UnknownAction)
Hi, I''m having a strange problem that only seems to be happening on our
production server. I never get this error locally but get it quite
often on the server. The other odd thing is it doesn''t seem to be
resulting in any error pages on the site. Everything looks fine...
I wanted to add a rescue_action_in_public to email me when there are
errors. So I followed the
2007 Aug 04
5
reusable specs - almost there
I have a lot of controllers with virtually identical functionality for most
actions. I''ve been using shared behaviours to DRY things up a bit, but I
still have to create separate behaviours for each context before I can use
the shared behaviours
what I have now is a generic file which contains all the behaviours and
examples common to all the controllers, and that file gets loaded from
2006 Feb 07
1
AWDWR: NameError (uninitialized constant UnknownAction) in rescue_action_in_public
I copied (and modified) this code from AWDWR:
def rescue_action_in_public(exception)
case exception
when ActiveRecord::RecordNotFound,
ActionController::UnknownAction
render :template=>''/error'', :layout=>''application'',
:status=>''404 Not Found''
else
render :template=>''/error'',
2007 Aug 24
11
Aliases not working in a subclass ?
Hi folks,
I''m overriding some resource attribute in a subclass. It seems that
specifying a resource by its alias doesn''t work in a subclass.
Looks like a bug, no ?
=== module-classes.pp ===
class module::base {
file {"/tmp/test-module":
alias => test-module,
content => "module::base",
}
}
class
2005 Dec 15
5
initialize called more than once?
Hi,
In my test case below, it seems that ''initialize'' is called everytime
''hello'' is called. Is this by design, a bug, or my pilot error?
class FooController < ApplicationController
def initialize
print "\n initialize \n"
end
def hello
print "\n hello \n"
end
end
I
2007 Jan 03
18
error "Stack level too deep" on ''exec[ "perl Makefile.PL" ] ?
Hi,
I''m testing puppet from the subversion trunk. I have a rather
hacked-together system to install a CRM into one of my nodes, which
worked (more or less) with version 0.19.3. When I tried to do a puppet
run on a completely clean node it seemed to stall on the ''compilation''
part (I do an exec of ''perl Makefile.PL'' in the appropriate dir). When
I broke
2006 Jun 01
9
access model from controller
Hello,
Rather new to RoR, so I''m not sure about the terminology and such :-/ .
My question is: how could I know the model which is associated to a
controller?
For example:
- controller class is TestController, which is a subclass of
ApplicationController
- associated model class is Test
How could I write some code in a method of ApplicationController to
dermine the current
2007 Jan 20
1
Missing action error not being caught
I keep getting a blank page containing only the following:
"There was a controller specfic error processing your request."
Though I have the following in my application.rb
def rescue_action_in_public(exception)
case exception
when UnknownAction, ActiveRecord::RecordNotFound then
render :controller => "application", :action =>
2007 Jan 04
10
New Feature: Graphing
Hi all,
One of the major new features in the upcoming release is that Puppet
now uses a graph library internally to handle resource
relationships. The big benefit to all of you is that you can use
this library to turn these graphs into images.
The trick, right now, is adding --graph when you run puppetd. This
creates .dot files, which can then be interpreted by the
2007 Sep 27
1
rspec_on_rails: controller method not getting called
In my rspec_on_rails controlle rspec, I have this:
require File.dirname(__FILE__) + ''/../spec_helper''
describe FooController, "with a foo" do
it "should be false" do
get ''index''
assigns[:foo].should be_false
end
end
In my controller I have this:
class FooController < ApplicationController
def index
@foo = FALSE
end
2008 May 11
2
UnKnownAction exception
Hi all,
i''m new in ruby on rails.
i created a controller which has 2 views index, add_to_cart
& inside index i created "button_to" which references to add_to_cart
view, but when i click on this button UnKnownAction exception appear
to me, i don''t know why this happen
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are
2007 May 26
13
munin module: manage clients and server''s config
Hello all.
Probably this question has already been posed in the context of another
software, but I am unable to find it.
I would like to implement a module which should manage munin-clients as
well as the munin-server.
Here is what I am thinking about implementing:
- There are two classes: munin::client and munin::server
- munin::clients'' configuration will be managed automatically.
2007 Jun 09
12
Example module for central git repository via http (sort of like a subversion repo) [a bit RFC]
Hi all,
I''ve been looking for a good example for how one would build a module,
but I couldn''t really find something that I liked, so I went ahead and
tried to do it myself.
The result is this: a git module (see attachment).
Please have a look and comment on it, before I add it to the wiki. I
especially want comments on the setup of the module itself, not so
much on the git