Re: [Radiant] map.resources and radiant admin

2007-04-04 Thread Karl Doody
Ooh, nifty! Thanks. On 4 Apr 2007, at 00:20, Sean Cribbs wrote: map.resources :testimonials, :path_prefix = /admin ___ Radiant mailing list Post: Radiant@lists.radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site:

Re: [Radiant] Problem with tag.locals

2007-04-04 Thread Keith Bingman
You need to call the id in both tags. I know it is a little counterintuitive, but the id tag is not being passed to the first tag, just the second. I banged my head on this for a few days, try it like this: tag mytag do |tag| if tag.attr[id] tag.locals.gallery = Gallery.find_by_id

Re: [Radiant] Extension problems: create model and rake db:migrate

2007-04-04 Thread Fabrizio Taddei
Sean Cribbs wrote: First problem: There are currently no generators for extension models/controllers/migrations/etc. You will have to make them manually, although even that doesn't take too much work. That said, it sounds like either 1) you have installed Radiant from the gem without

Re: [Radiant] Problem with tag.locals

2007-04-04 Thread Adam Salter
Keith, This didn't work. I'm going to work around it by doing: r:anothertag id='1' / r:yetanothertag id='1' / for the moment... but it's not going to work in the long run... is there a way to force/pass or create your own variables? e.g tag mytag do |tag| if tag.attr[id]

Re: [Radiant] Problem with tag.locals

2007-04-04 Thread Adam Salter
I think I've worked it out... Basically tag.locals is a virtual (don't know correct name) method... so if you want tag.locals.item.name you should first assign tag.locals.item to a variable and then query that variable: i.e. item = tag.locals.item return item.name you can assign with

Re: [Radiant] Extension problems: create model and rake db:migrate

2007-04-04 Thread Fabrizio Taddei
Fabrizio Taddei wrote: Sean Cribbs wrote: First problem: There are currently no generators for extension models/controllers/migrations/etc. You will have to make them manually, although even that doesn't take too much work. That said, it sounds like either 1) you have installed Radiant