[Rails] Re: assert_recognizes example throws syntax error

2009-08-11 Thread cnk
On Aug 11, 2:11 am, Sijo Kg rails-mailing-l...@andreas-s.net wrote:   This will work assert_recognizes({:controller = 'birds', :action = index},birds) Thanks. Adding parentheses fixed that test, and more importantly, fixed restful routes tests like: test should have some restful routes do

[Rails] Re: How to structure a database table with arbitrary labels for the columns?

2009-07-30 Thread cnk
Adding columns via code isn't hard. You'll have to double check that the new columns are picked up in your objects without having to restart the server when operating in production mode. But the real question is, is there enough commonality between data sets that whatever you are trying to do is

[Rails] Problem loading plugin that depends on another plugin

2009-07-30 Thread cnk
I am trying to extract some code I have written into a plugin (an engine actually, since I want to share the views to new apps). I really like the organization I see in the new Clearance engine - esp with respect to how they organize testing of the engine + testing the integration of the engine

[Rails] Re: Problem loading plugin that depends on another plugin

2009-07-30 Thread cnk
On Jul 30, 1:57 pm, Frederick Cheung frederick.che...@gmail.com wrote: plugin loading is a red herring here. The problem is that has_attachment is being called on the Experts::Photo::CallBacks module rather than on an activerecord class. You need to be doing this call from your self.included

[Rails] Re: to_xml

2009-07-30 Thread cnk
I think creating a builder file in your views directory will be the easiest way to get exactly the xml output you want. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this

[Rails] Re: Problem loading plugin that depends on another plugin

2009-07-30 Thread cnk
Oh now I see - I had just parked code into the module - not within a method. Dho! With Fred's pointer and some experimentation, I now have files uploading from my plugin code. The has_attachment code actually needed to go into ClassMethods, like so: module ClassMethods def

[Rails] Models as views on another model

2009-07-11 Thread cnk
I would like to selectively reuse some data. I have two groups of people who want very similar information about subject experts - but they want slightly different fields and/or want to see the other group's information but should not be able to edit it. If I create the following models, don't