similar to: ActionController

Displaying 20 results from an estimated 20000 matches similar to: "ActionController"

2006 Mar 17
2
How to specify default action for particulr actioncontroller
HI, How to specify default action for particular actioncontroller? Currently when I m typing the URL as "http:\\localhost:3000\actioncontroller_name" , then I m getting the default actin page as list.rHtml. But instead I want my action page to be index.rHtml. How to do it? Thanx. Prash -- Posted via http://www.ruby-forum.com/.
2007 Mar 02
5
ActionController::RoutingError
plz give me the solution to solve the below error ActionController::RoutingError ActionController::RoutingError in Issues#new Showing app/views/issues/_issue.rhtml where line #1 raised: issue_url failed to generate from {:controller=>"issues", :action=>"show", :id=>nil}, expected: {:controller=>"issues", :action=>"show"}, diff:
2006 Apr 03
5
Strange Problem with ActionController (I think)
I''m working through the Agile Depot example I have no idea what I did, but when I try and delete something from the web page I get this error on the log. Processing AdminController#destroy (for 127.0.0.1 at 2006-04-02 22:28:06) [GET] Session ID: 4371bd7ca2cb5ec5e08e60a7590df90a Parameters: {"action"=>"destroy", "id"=>"5",
2007 Sep 10
6
RSpec view spec writing problem (unable to generate url_for in RESTful resource link_to)
Thanks, first, to everyone who''s asked and answered questions on this list, and to the creators of RSpec - it is all very helpful. I''ve searched the mailing list, and had a couple 2hr googling sessions that didn''t help me find an answer. I''ve run into a problem getting my first non-trivial view spec to run. I get an error when trying to generate a link_to()
2005 Dec 07
3
ActiveRecord::Observer problem
Hi all, I have a problem with an observer. I have a simple observer... class ActivityObserver < ActiveRecord::Observer observe Customer def after_create(model) bind_params(model) @al.action = "create" @al.save logger "#{model.id} : created" end private def bind_params(model) @al = ActivityLog.new @al.user_id = User.current.id
2006 May 26
1
access a ActionControllers protected method from plugin?
I can''t belive I fit that in as the subject! I''m writing a plugin that will allow me to grab some text from a database and call the render method from ActionController on part of the text. I can''t seem to figure out how to access the render method of ActionController::Base. I keep getting the "uninitialized constant Execute" error. How can I do this?
2006 Jul 15
2
Render -> ActionController -> Render -> ...
Hi Guys, ActiveRecord is great for being able to drill down through many tables. I often locate the very "top" record, and have a render :action => "show" display that top record. Often I want to drill down like: @kingdom.phylums.classes.orders.each do |order| render :partial => "order/show" end But, depending on the user who is logged in, they see a
2006 Jun 07
3
ActionController::UNKnownAction (No action responded to crea
Hello All, I''ve developed RoR on windowsXP have deployed that on Linux. Everythings works fine when working on windows. Things are fine on Linux too untill I try to create new entry. I tried but couldn''t find any relevent information why it should happen only to this "specific" create action. I''m saying this because different create on other forms are
2006 Jul 25
2
Authentication design/ideas
Hi all, I''m using acts_as_authenticated for the front end facing part of my site. I have a model called Customer. I now want to protect the admin sides of things. I am thinking of using Ezra''s acl plugin (http://opensvn.csie.org/ezra/rails/plugins/dev/acl_system2/README) for this. My only problem is that I don''t want the model for admin users to be called Customer,
2005 Oct 14
2
Capture template output as plain html?
Hi, I''m trying to find out if the following is possible. I have a rhtml template stored in the database as a string. I need to process the template (as a string), similar to using ActionView''s <%= render_template("rhtml", @template_string) %>, but I need to do this in the ActionController and capture the result as a string. There is a method
2006 Jun 17
2
how to delete a parent record and child records?
Wow, got myself lost as *soon* as I left the hand-holding exercises in the books. I''m trying to set it up so when I click the (scaffold-generated) ''destroy'' link on one (of a list) of parent MySQL records, the children records in a different table get deleted also. Very simple setup: my tables are ''customers'' and ''accounts'' class
2007 Jan 15
5
ActionController::UnknownAction (No action responded to xxx)
I have a new method defined in a existing controller. All the methods I called in these are workable. But somehow the new method is not recognizable. ------------------new method I added-------------------------------------------- def push # if fair begin @product = Product.find(params[:id]) rescue logger.error("Attempt to access invalid product #{params[:id]}")
2007 Mar 07
4
Strange Problem With Unwanted, Transient Caching
Hello, I hope somebody can explain to me what''s going on here because I''m baffled! In a controller''s action I want to create a new order for a customer. Because I post back to the same action (not RESTful I know, but that''s for another day) I use code like this: def edit @order = Order.find_by_id(params[:id]) || Order.new ... end I
2007 Oct 16
1
Stub ActionController::Base#params
Has anyone had any success stubbing ActionController::Base#params? The following is not intercepting calls to params[:foo] in my controllers: ActionController::Base.stub!(:params).and_return(:foo => ''bar'') -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-users/attachments/20071016/282a76ba/attachment.html
2006 May 26
8
calling render_to_string outside of controller
How can I call render_to_string outside of a controller. I''m stuck on this. I''ve nearly got my plugin finished but I can''t seem to get this to work. The method is in ActionController::Base but it is protected. -- Posted via http://www.ruby-forum.com/.
2005 Dec 11
7
Catching Exceptions in ActionController
I''d like to be able to catch ActionController::MissingTemplate exceptions from within ActionControlle, *but*, MissingTemplate isn''t defined within my controllers!!! How is that possible - after all, all controller subclass ActionController, so how are exceptions it defines not there!? More importantly, how can I do this? -- Posted via http://www.ruby-forum.com/.
2008 Mar 14
3
ActionController <-> ActiveView code access ambiguity
Hi All! This is not a problem in general but i''ve just missed the point. If my application has a global state, which i have to use both throughout ActionController and ActiveView, then, where to place that state? E.g. if I do this: class ApplicationController < ActionController::Base protected def authenticated? !user.nil? end end then I can''t use that from any
2006 Jun 02
1
controller instance methods available in rhtml?
In rhtml, you have access to controller. I am trying to set an instance var in my controller, then retrieve it in my form display. I know I could do this through one of the hashes I have access to, but I''m trying to understand why I can''t do it this way. No matter what, when I try to output from my rhtml either <%= controller.whynot || ''Unknown'' %> or
2006 Mar 29
2
save related models from one form
I have three tables customers, indentities and people. I hav ecreated models for them. The are connected with foreign keys and has_many/belongs_to in this fashion: customers has_many: identities identities belongs_to: customer identities has_many: people people belongs_to: identities Now, I have a form in which I would like to create db entries for the three tables. customers have a password
2008 Jan 03
1
help - updated from 1.2.5 to 1.2.6 and getting undefined method 'session=' for ActionController::base
i start the server but it exits right away, I ran the rake to update and changed the version string in config.rb. Any thoughts on this matter would be appreciated. i imagine that it has something to do with the session, but i am not able to figure it out. my config/config.rb has the following config.action_controller.session = { :session_key => ''c3_rails_session'',