similar to: DRYing up controllers

Displaying 20 results from an estimated 1000 matches similar to: "DRYing up controllers"

2010 Jan 25
9
skinny Controllers, fat models with REST?
Hi, I''m really new to rails, so i programmed some stuff and today i read some things about skinny Controllers, fat models. My Controllers are really fat now. So i''m asking myself how can i shrink my controllers and move the code to the models, especially in fact of REST e.g. in focus on error codes? code example: # POST /tasks # POST /tasks.xml def create @authorized
2008 Jan 26
0
RSpec and resource_controller plugin
I just discovered James Golick''s resource_controller plugin http://jamesgolick.com/resource_controller after spending another stretch of boredom making the changes to nest yet another rails resource controller. I''d actually slowed down this time to think about what I was doing in hopes of automating the task. I''ve tended to use script/generate rspec_scaffold to get
2010 Dec 20
4
Subselection by URL
Hey guys, I''m quite new in RoR, so please excuse me when I may ask weird questions. I am working on a database frontend. The layout looks mostly like a has_many bs b has_many cs c has_many ds and so on. Now I want to do some selection. Maybe I want to see all ds belonging to a specific b. I would like to do it like: http://my.host/bs/1/ds When I click around there (add new ds, show a d
2007 Dec 27
6
ActiveResource and (polymorphic) associations
Hi, I''m just playing with ActiveResource and I did''nt find anything about the support of (polymorphic) associations. Is there a support at all? Thanks in advance --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2008 Mar 16
3
undefined method `redirect_to'
Hi all. I''m getting the following error in my app: undefined method `redirect_to'' for ActionController::Base:Class I''m using Windows 2000, Rails 2.0.2 and resource_controller (from James Golick). My controller: class CommentsController < ApplicationController include ResourceController::Controller belongs_to :post, :article, :photo create do
2008 Dec 19
3
Recommended way of restricting action permissions?
Hi, I just have a "best practices" question. I''d like to block users that don''t own a particular resource from performing edit/update/ destroy actions on it. Here''s how I currently do it: ## User has many resources, of different types ------- resource_controller.rb ------- before_filter :require_ownership, :only => [:edit, :update, :destroy] ... public
2006 May 23
5
QoS book
Hello all, Can anyone recommend a good book which thoroughly explains QoS from a Linux perspective? Something with TC examples & the like. I''ve looked at the following: http://www.amazon.com/gp/product/1580533418/qid=1148368189/sr=1-2/ref=sr_1_2/102-2819973-6353768?s=books&v=glance&n=283155 Engineering Internet QoS. Thanks.
2005 Jan 05
4
TC GUI or graphs?
Hello everybody, I am new to the lartc mailing list. I have been using "tc" for some time now. To be precise, tc & HTB to shape traffic. I did a lot of search on Google for 2 things: - A GUI to create configure new qdiscs & classes for HTB - A utility that will graph the data sent through all configured classes or qdiscs. I could not find anything. Could someone tell me if a
2010 Sep 28
12
Completed 406 Not Acceptable
After migrating my 2.3.9 app to rails 3.0.0 I get this error: Completed 406 Not Acceptable in 513ms I also noted that processing controller doesn''t output the protocol: -- Processing by Admin::PhotographersController#update as while if it works, say: -- Processing by Admin::PhotographersController#update as HTML Here is the full action output http://pastie.org/1187051 Can
2012 Sep 04
10
Generic asset definitions and management
(The following is not a Rails-specific question, but relates to a problem that affects Rails, so I wonder whether anyone on the team has an opinion about it or knows whether a solution is already in development.) While gem dependencies can be easily managed in a Gemfile by Bundler, when it comes to other assets, you either have to manually copy javascript files into the app/assets or vendor
2005 May 06
3
QOS monitoring?
Hi, I have implemented QOS classifiers using TC with HTB. The classification is working. I would like to know whether there is some tool which will help me in monitoring the bandwidth share of the various classes. Thanks, Vinod C
2004 Oct 27
3
Traffic Control Diagnostic Graphing Utility
I wrote a Perl script to poll `tc` for traffic control statistics (just bytes presently) for leaf qdiscs. The information is fed to either RRDTool or Munin[2], depending on what parameter is passed to the script. If the option for a RRD database is used, graphs[3][4] are written to disk for each ten second polling interval. If invoked via Munin[2], it handles graphing and samples at five
2000 Jul 06
2
GUI Samba?
*This message was transferred with a trial version of CommuniGate(tm) Pro* Hello, I'm new to Linux, I work on a PC, Mac, and now Linux network. I have been looking for somthing like samba that will work on Xwindows. If you could point me in the right direction I would be thankfull. Hope to hear from you soon, Zeek Bower.
2006 May 25
3
How to limit bandwidth in iptables -- HELP
Hi, Can anybody help me out, how to manage or limit bandwidth through iptables while having internet connection on eth0 and working as a gateway in LAN. Thnaks in Advance. Vikram _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
2006 Jan 05
2
statistics htb
Hi can anybody tell me what is the best and right way to gather statistics from htb.init usage in graphics or in any other format cause it''s pretty uncomfortable to view statistics in text when you''ve got 4 interfaces and enough filters and queues Thank you ! Dzmitryj Jakavuk
2005 May 21
2
TC/HTB Graphs
Hi iam looking to graph the tc classes and qdisc iam trying to access the stef scripts but its site is totally broken could some one point me where i can graph using good docs hare
2004 Sep 29
3
Oops from netlink or what?
I reported this previously and it was verified. Is this a bug in netlink or what? Who should I report this to? Original Oops report: http://mailman.ds9a.nl/pipermail/lartc/2004q2/012614.html Thanks. Linux rebecca 2.6.4 #1 Mon Sep 27 15:16:48 EDT 2004 i686 GNU/Linux Sep 27 19:02:58 rebecca kernel: Unable to handle kernel NULL pointer dereference at virtual address 00000000 Sep 27 19:02:58
2012 Oct 18
0
unexpected return (LocalJumpError) only when executing this code within autoloaded classes?
Posted on stackoverflow but no traction yet: http://stackoverflow.com/questions/12942505/why-does-using-set-trace-func-work-in-some-places-but-cause-unexpected-return-l The following is a generified part of the code in a gem I''m working on: module SomeModule class << self attr_accessor :procedure def log_events(*args) args.flatten!
2011 Oct 02
4
apply.pp module missing?
Hello, I have succesfully installed puppet on ubunu, one master and one client. I am going through the documentation and I am having a hard time getting this example to work http://docs.puppetlabs.com/learning/manifests.html $ puppet apply my_test_manifest.pp I get this error root@puppet:/etc/puppet/manifests# pwd /etc/puppet/manifests root@puppet:/etc/puppet/manifests# puppet apply
2004 Sep 30
4
Voice mail
I have and asterisk server that has been up and running for sometime and the voicemail quit working as when you go to voicemail you can't hear the greeting. But you get the message vm-theperson is playing. Thank you, Eddy Woodward Hayes Computer Systems 1355 Thomaswood Drive Tallahassee, Florida 32308 Email: ewoodward@hcs.net Phone: 850/297-0551 Ext. 129 Cell: 850/556-4064 Fax: