I use postgres, mostly. You want to implement rules. From the create view
docs:
"Currently, views are read only: the system will not allow an insert,
update, or delete on a view. You can get the effect of an updatable view by
creating rules that rewrite inserts, etc. on the view into appropriate
actions on other tables. For more information see *CREATE
RULE*<http://www.postgresql.org/docs/8.2/static/sql-createrule.html>
."

You are expecting Rails to take care of something that it should not be
concerned/aware of. Create the "CRUD" rules on your postgres views, and as
far as rails is concerned, they are just tables, or even better, "a thing
where active record persists data"...



On Fri, Apr 17, 2009 at 8:57 AM, Tim Uckun <[email protected]> wrote:

>
>
> On Sat, Apr 18, 2009 at 12:43 AM, Harold A. Giménez Ch. <
> [email protected]> wrote:
>
>> What DBMS are you using? The alternative is a "materialized view".
>>
>
> postgres.
>
>
>>
>>>>
>>>> Name the fixtures.yml file after the actual target table, not the view.
>>>>
>>>>
>>> I'll give that a shot. Thanks...
>>>
>>>
>
> This didn't work. There are no fixtures with the names of the views and the
> test suite still tries to run a delete from the views.
>
> I can't believe rails has no conception of views. Must be the mysql
> heritage (I know mysql has views now).
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to