John W. Long ha scritto:
> Francesco Lunelli wrote:
>
>> In the old version of Radiant I created sites with all controllers,
>> models etc in the site so I modified them to avoid that the default
>> values was inserted in the db.
>> But now I migrated to the new version of Radiant 0.6.1 and all the code
>> of Radiant is in the gem. How can I ovewrite the default functionality
>> and insert my values in published_at column?
>>
>
> Can you use the console?
>
> $ script/console productionLoading production environment.
> >> page = Page.find_by_url('/')
> => #<Page:0x365b8fc @parent=, @attributes={"virtual"=>"0", ...
> >> page.published_at = Date.parse('1/1/2000')
> => #<Date: 4903089/2,0,2299161>
> >> page.save!
> => true
> >>
>
>
Yes I can use console but what I nedd is a little different.
I know that I am perverting the nature of Radiant, but I am trying to
adapt it to the needs of my silly customers. (Why customers are quite
always silly?)
I created a form and a script that parse the form and insert it in the
radiant structure adding correct page parts etc.
The customer need to upload press releases, the page is made with
different parts: title, description, link (to a pdf tha is upload in
the form) date.
Every time the customer compile the form I need to insert a date written
by the customer that could be different form the actual date.
I changed the code in the gem, but I would prefer to do a cleaner job
becasue changing the gem changes every radiant site on the same machine.
(Fortunately I have only one site for the moment)
--
Francesco Lunelli
Ymir s.r.l.
Viale Verona 190/11
38100 Trento
_______________________________________________
Radiant mailing list
Post: [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant