similar to: Where to put code - controller or model

Displaying 20 results from an estimated 4000 matches similar to: "Where to put code - controller or model"

2007 Jan 25
6
NOT FOUND error
I''ve been hunting the web and reading the mailing lists all day but I''m not finding any guidance on this problem. When I try to talk to my mongrel it simply responds with NOT FOUND and nothing else. I can''t find anything on google because this has to be the second most commond phrase in existence. Any help or guidance would be greatly appreciated. Sincerely, Chuck Vose
2006 Jul 06
6
Problem with gettext and functional tests
Hi, I am using gettext to let my web application know several languages. All works fine, but since I integrated it, my functional tests don''t work any more. I keep getting the error message: NoMethodError: undefined method `cgi'' for #<ActionController::TestRequest:0xb77f7f88>. All right, TestRequest doesn''t have a cgi method. Therefore I just included this into
2006 Jul 17
5
Functional Tests misbehaving with Globalize
Howdy all Apologies to the folks subscribed to the globalize list for dual posting this message... I''ve got a project running globalize and rails 1.1.4, and I''ve only recently adopted a strong love for testing. Now my models are 100% tested (I must note that I do not make use of any translations in the database yet), and I''ve now started with functional tests before
2006 Jul 18
3
DB Migrations & Column Order
Hello, I created a table and about 10 migrations down the line I decided that I needed to add an ID column (this was actually a table for a has_many :through and I recently realized that it needs an ID column, unlike HABTM tables). I am a big perfectionist and I frequently run "SHOW COLUMNS IN table;", so I naturally expect to see the "id" column the first one listed. However,
2006 May 24
8
Where to recruit Ruby on Rails developers?
Anyone have suggestions on where to recruit Ruby on Rails developers? My startup''s in Berkeley, CA and I''m looking for a talented technical lead. I''ve tried LinkedIn and Craigslist but the pickings are slim. This project provides an opportunity to use OpenLaszlo. rocky at_sign teampatent dot com -- Posted via http://www.ruby-forum.com/.
2006 Jun 30
14
Saving boolean attributes
Hi, I''m just learning Ruby on Rails and ran into something where I know I''m either doing something very stupid or I''m missing something. My model as a boolean attribute called active_flag. In my Sql Server database this is stored as a bit value. I then setup a method in my controller called "deactivate". This is very simple, it does: def deactivate
2006 Jul 18
4
Multiple Layouts - Single Controller
How do I do multiple layouts for a single controller: I am aware I can do... render(:layout =>''mylayout'') for individual actions, however this becomes a multiple render problem. I tried this... layout "mylayout", :except => [:myaction, :myotheraction] layout "myotherlayout", :only => [:myaction, :myotheraction] However that doesn''t
2007 May 10
6
Where put buissness logic?
I''ve always think that it belongs to controller but I''ve read few articles that it should be done by model and controller should be thin glue betwean model and view. Where should I put it? Regards -- I''ve probably left my head... somewhere. Please wait untill I find it. Homepage (pl_PL): http://uzytkownik.jogger.pl/ (GNU/)Linux User: #425935 (see
2006 Oct 20
7
MVC and modules. Views telling models to behave
I was thinking today, it would be nice if a view could tell a model how to format it''s data for that particular view. Kind of like, the view is bestowing instant, and temporary knowledge on the model for the duration of the views run. It seemed to me that this would be more objecty than say a helper that formats a string format_my_string( my_string ) Instead, in my view. Lets assume I
2006 Jul 18
3
Navigation techniques, everyone?
I''m rewriting the code to my first app. I want to reuse a lot of it, but tidy it up a lot. The first thing I will tackle is my nav-bar. Throughout a user''s experience on my app, I want it to reload as little as possible (I''ll have about 7 or 8 controllers with about 70 actions). So, I''ve thought of a few ways of doing it, and was wondering if you guys
2018 Apr 10
2
Domain Users group with multiple gid
> No dia 08/04/2018, às 21:20, Clemente Aguiar <ca-mlsamba at arditi.pt> escreveu: > > Às 15:45 de 08-04-2018, Rowland Penny via samba escreveu: >> On Sun, 8 Apr 2018 14:44:30 +0100 >> Clemente Aguiar <ca-mlsamba at arditi.pt> wrote: >> >>> Às 13:51 de 08-04-2018, Rowland Penny escreveu: >>>> On Sun, 8 Apr 2018 13:22:28 +0100
2018 Apr 08
2
Domain Users group with multiple gid
On Sun, 8 Apr 2018 14:44:30 +0100 Clemente Aguiar <ca-mlsamba at arditi.pt> wrote: > Às 13:51 de 08-04-2018, Rowland Penny escreveu: > > On Sun, 8 Apr 2018 13:22:28 +0100 > > Clemente Aguiar via samba <samba at lists.samba.org> wrote: > > > >> The samba was created by Zentyal system (http://www.zentyal.org). > >> > >> Here is smb.conf:
2006 Jul 06
6
Functional tsts
Hi all, I have created projects module in my application using scaffold, and it created me everything, and all the modules are working except the functional test. This is the error 1) Failure: test_create(ProjectsControllerTest) [test/functional/projects_controller_test.rb :55]: Expected response to be a <:redirect>, but was <200> 8 tests, 25 assertions, 1 failures, 0
2006 Jul 06
3
Accessing form field contents
I have an HTML form on the screen, that is connected to a database (standard Ruby way). I found that there are people that would rather not fill in this information, but would rather search Amazon for the info. Therefore, I added a link to the right of one of the fields that, when pressed, will search Amazon for what ever you typed into that field. So, how can I do that? At first I tried
2007 Jul 19
8
Where do I put code for my own types?
Sorry for all the questions today... Beyond the obvious things--models, controllers, helpers, and other framework-related types--where should I put the code for my own types? For example, I was thinking of writing my own AJAX-friendly paginator, but I don''t know where to put the code for that sort of thing. I would prefer to keep things object-oriented, so I would rather do a lot of
2016 Jul 01
3
Securing RPC
Dear Community I hope you are all doing well. Recently I have been receiving several complaints from our service provider. Please see the complaint below: A public-facing device on your network, running on IP address XXX.XXX.XXX.XXX, operates a RPC port mapping service responding on UDP port 111 and participated in a large-scale attack against a customer of ours, generating responses to
2006 Jul 20
2
workweek_select
I''m having difficulty figuring out the ruby neccessary to do this so I thought I would try the list. I''m hoping to get a date_select to only display certain days (specifically only fridays) but rails doesn''t seem to have the flexibility so I''ve been going at it in ruby to no avail. I''ve looked on google but couldn''t find it (because it
2006 Jul 18
9
Simple Array Issue - HELP
Ok, I am interfacing with the del.icio.us API and I want to collect the links in an @instance variable for my view. But I''m having trouble with that part. Here''s what I have: def get_authenticated(path, http) request = Net::HTTP::Get.new(path) request.basic_auth ''user'', ''pass'' response = http.request(request) response.value response.body end
2006 Aug 11
3
General architechture / MVC question
Hi all, A newbie with Ruby on Rails - and programming in general - I''m working on a few Flash and PHP projects as well. Partly to make my work more efficient, partly to gain a better understanding of system architecture / design patterns, I''ve been trying to use the MVC pattern in database-backed Flash / Actionscript development as well. I think / hope that I''m
2006 Jul 07
8
Going to production soon, need server advice
I''ve got a RoR app that will be going to production soon (in the next month or so) and would like to get some feedback on what kind of web server setup people have had good luck with. I''m looking for something that is: 1. Stable 2. Easy to setup 3. Secure (sorry but Windows is ruled out here) My deployment will either be on Fedora Core 5 or possible Mac OS X Server.