brain.rbinstance_missing
PlainView is a plugin i wrote that adds a fun DSLed create_view (and drop_view of course). to your Rails migrations toolkit and harness the power of database views in your application with fun and joy.
as for now this is only available as a plugin, install as follows:
script/plugin install git://github.com/eladmeidar/PlainViews.git
First you’ll have to generate a migration
script/generate migration create_users_and_views
Than, on self.up you can use the create_view helper:
class TestView < ActiveRecord::Migration
def self.up
create_view :v_people do |t|
t.base_model :user
t.select :select => ‘id, name’, :conditions => {:name => ’elad’}
t.use_security_mode :definer
t.use_algorithm :merge
t.use_check_option :cascaded
end
end def self.down drop_view :v_people endend
:merge or :temptable.:definer or :invoker:cascaded and :localI investigated a bit, and the basic usage (select / base_model) should run successfully on:
although i was unable to actually test it on all of them, help is appreciated here :)
Not yet actually, there will be some soon.
Tests!
| Variable | Value |
|---|---|
| GITHUB | |
| WWR | { :working_with_rails => 'http://www.workingwithrails.com/person/5844-elad-meidar' } |
| IRC | { 'irc.freenode.net' => [ '#rubyonrails', '#railsbridge', '#ruby', '#mootools' ]} |
| SKYPE | eladmeidar |
You're seeing this error because I think it is funny.