search for: foo_control

Displaying 13 results from an estimated 13 matches for "foo_control".

Did you mean: foocontrol
2013 Nov 12
7
Hook into Exception Chain
Hi there, I''m using Log4r in my rails projects. On log.error an email is sent using the EmailOutputter. I know changed the EmailOutputter to include a global var in the subject (MDC) since the subject is normally static. I want to set this var to the exception message, so it is sent as the subject. Can anyone tell me how to do this in rails? Basically: raise e or some other cause
2008 Apr 01
1
"Undefined method merge" when using sweeper
...controller/caching.rb:612:in `send'' .../vendor/rails/actionpack/lib/action_controller/caching.rb:612:in `method_missing'' #{RAILS_ROOT}/app/sweepers/foo_sweeper.rb:13:in `expire_cache'' #{RAILS_ROOT}/app/sweepers/foo_sweeper.rb:5:in `after_save'' .../app/controllers/foo_controller.rb:61:in `unsubscribe'' Any ideas what can be wrong? I''m using Rails 1.2.6. Thanks in advance --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this g...
2006 Feb 14
22
Teaching Models to Render Themselves in the Controller
I am trying to teach my models how to render themselves, i.e. <%= my_model_object.render() %> Let me explain my reasoning and proposed method before this gets shot down as anti-MVC. Let''s say I am writing a contact-management application. I have a class Contact. I will need to display this class all over the application. My first choice is to use a partial. Now I can
2006 Apr 11
0
Page cache and query string
...server rewrite URLs of the form http://www.site.com/foo/bar?a=b to http://www.site.com/foo/bar/query/a=b. Then in config/routes.rb there is: map.connect(''foo/bar/query/:query_string'', :controller => ''foo'', :action => ''bar'') In foo_controller.rb: class FooController < ApplicationController caches_page :bar before_filter :merge_query_string def bar render :text => "You asked for #{params.inspect}" end private def merge_query_string params[:query_string] or return params....
2006 Mar 30
1
flash, before_filter and redirect_to
I leave a notice in the flash and do a redirect from a before_filter. Can someone confirm that the first request after this, i.e. the page I redirect to, doesn''t/isn''t supposed to clear the flash? -- View this message in context: http://www.nabble.com/flash%2C-before_filter-and-redirect_to-t1367103.html#a3665933 Sent from the RubyOnRails Users forum at Nabble.com.
2007 Apr 03
1
Some timezone trouble involving tzinfo and postgresql
...eviously selected value in the DDL. Okay, diversion over. Moving on: 6. So let''s just say my app allows users to make many foos. One at a time. And each foo goes to the bar for a pint at a specific time, but we initially set it to Time.now(), usually. Well, now I''ve updated foo_controller to do it according to the user''s time_zone: def new @foo = Foo.new @foo.goes_to_bar = @current_user.tz.utc_to_local(Time.now) end This correctly sets the selector for the timing of the Foo to "now" in the user''s local time. On save, this value is appropriat...
2006 Jan 03
2
Odd Routing - How To?
I am working on an app with a requirement that has yielded an unexpected problem for Rails routing. We have several controllers that handle regional data (one controller per data type - weather, demographics, etc). The problem is that there is one region who''s actions and output are different. We intend to create two controllers for each data type (i.e. weather_controller to handle
2005 Nov 03
12
Installation of plugins/gems/mix-ins confusion
I''m running 0.14.2 and am a little confused as to the best way to install mix-ins. I''m specifically using "acts_as_paranoid" as an example (as it is one of the simpler implementations). It is a gem and can be "installed" as a gem, but then what''s the best way to integrate it into my app (require_gem?). I''ve seen recommendations to require it
2007 Jun 06
10
Attachment_fu S3 uploads killing mongrel
...ge is never uploaded to S3 and I''m getting the lockup shown above, which requires me to restart my mongrels. I''ve been stuck on this for a good 2 weeks and haven''t been able to find any working solutions anywhere. I would greatly appreciate any advice. Code follows... **foo_controller.rb** def create begin @foo = Foo.new(params[:foo]) respond_to do |format| if @foo.save format.html { redirect_to foo_url(@foo) } else format.html { render :action => "new" } end end rescue render :action...
2006 Jan 30
7
"x" and "y" values in a form_tag
Hi, I have some strange output in my log file, where I am sending information via a form to the database, eg: <-- snip --> Processing StoreController#add_var_product (for 127.0.0.1 at 2006-01-30 12:30:19) [POST] Parameters: {"size"=>{"id"=>""}, "x"=>"44", "y"=>"11",
2007 Mar 08
6
NetBeans IDE 6.0
Hi there ! I came across the NetBeans IDE and also the screencasts. Here are the links for screencasts: http://blogs.sun.com/roumen/entry/two_demos_jruby_on_rails D/L Link : http://nbi.netbeans.org/m11/download.html I''m now on Kdevelop and not yet tried NetBeans and its ~80 Mb of D/L. If any of you had tried it out, do post your views. -- Arjun.
2008 Jan 22
11
Unable to load Models which reference plugins?
I''m using a plugin which adds a method to ActiveRecord::Base http://similetimelinerailshelper.googlecode.com/svn/trunk/simile_timeline/ This adds an "acts_as" type declaration to the Models, via the file in vendor/plugins/simile_timeline/lib/simile_timeline.rb Rails is working with these declarations, and they are being used successfully in ''regular
2006 May 31
13
What are controller modules *for*?
I am aware that controllers can be placed in modules: ruby script/generate controller modulename/controllername But what does this buy me? Is it just a way of ensuring that my source code is nicely arranged, or can I use the fact that a set of controllers are all within a particular model to implement functionality common to all of those controllers? Why am I asking? The app