similar to: Basics - help with models &controllers...

Displaying 20 results from an estimated 5000 matches similar to: "Basics - help with models &controllers..."

2006 Apr 25
16
case statements in views...strange error on OSX
I have a simple case statement in one of my views. This works fine on my windows machine. Move to the mac and I get: "parse error, unexpected tIDENTIFIER, expecting kWHEN". I have not changed anything but cannot resolve the issue. my view has this in it (simplified for test) <% case controller.controller_name -%> <% when "accounts" -%> <h3>worked
2006 Jan 27
2
DB & AR advise please (diagram inc)
Hi, Being new to Rails and Active record could someone please check my database diagram: http://spectrais.com//images/0.png I am building a trouble ticket system for my company. Simply put a client has many users. Those users can create trouble tickets. Each trouble ticket can have many journals that track the progress of the ticket. An employee (of our company) can take ownership of a
2006 Jan 06
4
Design flaw with Fixtures?
I''ve been trying to add unit testing for collection of models with complex relationships -- and failing miserably. Because of the complexity of the relationships, I''m using a database which validates foreign key constraints (PostgreSQL 8). I''m finding it nearly impossible to generate tests that are independent of each other. The basic problem is the DELETE then
2006 May 07
3
Needle + Rails - IoC
Hi, I''m looking for past efforts to integrate Rails and Needle. I am thinking of doing it myself but would be interested in seeing what others have done before. If there are examples of other IoC frameworks being used with Ruby I''d be interested in hearing about them too. I find IoC to be a helpful concept in general and, having glanced at a few existing Rails app.s, I
2010 Jan 12
5
Multi-Tenant Parking
Has anyone managed to get multi-parking lot call parking working correctly? I've had several attempts at it, and never seem to be able to get it to go properly - (actually, at all): I've most recently done this with 1.6.1.x, and now 1.6.2.x, with no luck in either case. What I've been "trying" is the following: features.conf [general] parkext => 100 [featuremap]
2006 Feb 12
7
ROR Recipes Beta: Why use taggings instead of tags_contacts? NoMethodError tag_with?
I have gotten acts_as_taggable to work for a test application as documented on taggable.rubyforge.org I am following Chad''s excellent examples in ROR Recipes Beta book. I have a few questions and hope that Chad or some other expert can help clarify them. 1. Why is the book suggesting to use taggings table instead of tags_contacts, as mentioned on taggable.rubyforge.org?
2006 Jul 16
4
migrations questions: MySQL -> postgreSQL
I started my app before migrations were a best practice and have been using SQL scripts. Now I''m looking at potentially having to move from using MySQL to postgreSQL to use a particular hosting provider. I understand migrations are the way to go to make this ''easy'' but it also looks like the use of migrations introduces extra work in other areas. I''d really
2006 Jul 21
2
New Generator: hasmanythrough
To the aide of anyone whose had to create new models, migrations and unit tests for the common many-to-many relationship, using "has_many :through" (that''s almost everyone). I''ve created a new generator that generates two model classes, plus a many-to-many relationship class, e.g. User, Group, plus the Membership model between them. It also generates the migrations
2006 Jun 05
18
Ideas for Rails Shirt Graphics
I''ve had a couple ideas for Ruby on Rails shirt graphics for a little while now: 1. "Fuck You" superimposed over, oh, probably a Ruby gem. Or Rails of some sort. 2. "Ruby on Rails" superimposed over rails of cocaine. Maybe also with a graphic of a crazed looking coder. Anybody got graphics? Or can make them? Heh! Joe -- Posted via http://www.ruby-forum.com/.
2006 Jul 25
8
Creating records in two models in a RESTful way.
Hey everyone, I have a philosophical question here. Say I have a website that uses two models for accounts: Person and Company. Normally I would just have /accounts/new for user signup. However, the RESTful way to do it is to have /people and /companies. Unfortunately, this doesn''t account for a situation where you''d have a one-page signup form. I wouldn''t want
2006 Jan 25
11
Schemas and Migrations
Hello- I''m new to the ruby-based schemas and migrations. As I''m looking over examples and such online, I see that many of them don''t make use of schema-enforced attributes. For example, instead of: t.column "post_id", :integer, :default => 0, :null => false They do: t.column "post_id", :integer So I''m wondering -- is this
2006 Nov 27
3
Consistency in REST-routes naming
Hello everyone! In working with the Rails-REST-features I have always wondered about the URL for the new-action /objects/new In REST the URL should represent a Resource. As the semicolon is for adding non-standard actions (verbs) to a resource, IMHO it should be: /objects;new and not /objects/new In fact, this is just like an additional action, which I would specify with the
2006 Jan 05
1
[REQ] Document, post, DHH talk about "Why Rails ?"
Hello, I''m writing internal slides (fr government) presenting RoR, perhaps soon in CC licence. Can you point me to some reference where "Rails History" or "Why DHH choose to develop is "own" Framework" are discuted ? In fact I try to answer the background question "Why another framework ?" Thanks! Ciao''
2006 Aug 09
21
DHH''s Post on Ruby Talk -- Rails 1.1.5: Mandatory security patch (and other tidbits)
We''re still hard at work on Rails 1.2, which features all the new dandy REST stuff and more, but a serious security concern has come to our attention that needed to be addressed sooner than the release of 1.2 would allow. So here''s Rails 1.1.5! This is a MANDATORY upgrade for anyone not running on a very recent edge (which isn''t affected by this). If you have a public
2006 Jan 04
4
many to many link table compound primary key explosion
Hi, I have a many-to-many relationship between two tables, questions and answers. My MySQL schema for the link table creates a primary key from the two fields to prevent duplicate records. When I add the same answer to the same question more than once, rails attempts to create a duplicate record and explodes with a MySQL error: MysqlError: Duplicate entry ''3-3'' for key 1:
2006 Feb 11
6
DHH Interviewed by MySQL
I didn''t see anyone post a link to David''s Interview by Lenz here on the list so I decided to post it. The interview can be accessed here: http://dev.mysql.com/tech-resources/interviews/david-heinemeier-hansson-rails.html I was very happy to see the interview on PlanetMySQL as just the other day I was talking about RubyOnRails on my MySQL blog which is syndicated
2006 May 24
22
Components going out of style?
I see in the new Agile Rails 2nd edition that components are going out of style? Is this so? has anybody abandoned the idea of components for helpers? Specifically I''m considering a menu sytem for a website that depends heavily on the users permissions to decide which menu options a user would need to see. I thought that components, since they have the logic in the controller and
2006 Jul 04
2
WAP/WML/Mobile Internet Access with RoR
Is there any good information on doing WAP/WML/Mobile Internet Access with Ruby on Rails. I''ve tried surfing the web, but couldn''t come up with anything substancial. I would appreciate any input in this regard. Thanks in advance Gopal -- Posted via http://www.ruby-forum.com/.
2004 Jul 29
1
Unauthenticated calls from a specific IP
Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 4055 bytes Desc: not available Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20040729/85af8309/attachment.jpeg
2006 Feb 11
16
Why does''nt rails pick up more metadata from a mysql schema?
Hi, when I define a db column to be non-nullable or of length 20 or as numeric, I would expect rails to validate that, but that doesn''t seem to be the case. Any idea why that is? The metadata is accessible, at least in the mysql case. I am using rails 1.0 with mysql 5. Cheers, Mariano