Posting here as it applies to RC1, apologies if it should be in the
main rails list.
I'm trying RC1 out and have found that I can't call any methods from
my application controller now.
For example, I have a method called main_login in
ApplicationController and when I attempt to access via url as
application/main_login, I get the follow error...
no route found to match "/application/main_login" with {:method=>:get}
I've found that all my application controller methods produce the same
result. Has something been deprecated that I'm unaware of or am I
missing something obvious (based on the info here) and just doing
something stupid?
Do I have to "upgrade" my routes.rb file or something?
no route found to match "/application/main_login" with {:method=>:get}
I've found that all my application controller methods produce the same
result. Has something been deprecated that I'm unaware of or am I
missing something obvious (based on the info here) and just doing
something stupid?
I don't believe it was ever the intention to route to actions on the
application controller (which are also available on all other
controllers). ApplicationController was only really intended for
before_filters, utility methods and the like.
Though really the ApplicationController is just any old ActionController that your others inherit from by default. I don't believe your controllers need to inherit from ApplicationController, so standing by itself it should be ok to route to it.
In saying that, though, if you're doing this on a standard Rails app then you're probably doing something wrong.
Ok, I can live with that, but this might be something that should be
made a little, ok, a lot more obvious in the upgrade path notes... on
the weblog, etc.
Since I've never seen/read anything that discourages calling methods
on the ApplicationController, I'm sure I'm not the first to have done
it.
Ok, I can live with that, but this might be something that should be
made a little, ok, a lot more obvious in the upgrade path notes... on
the weblog, etc.
Yeah, this is definitely worth mentioning in the upgrade guide.