{"action":"created","issue":{"url":"https://api.github.com/repos/thoughtbot/scenic/issues/74","labels_url":"https://api.github.com/repos/thoughtbot/scenic/issues/74/labels{/name}","comments_url":"https://api.github.com/repos/thoughtbot/scenic/issues/74/comments","events_url":"https://api.github.com/repos/thoughtbot/scenic/issues/74/events","html_url":"https://github.com/thoughtbot/scenic/issues/74","id":104150730,"number":74,"title":"What are your thoughts on the 'schema_plus_views' gem?","user":{"login":"KurtRMueller","id":879734,"avatar_url":"https://avatars.githubusercontent.com/u/879734?v=3","gravatar_id":"","url":"https://api.github.com/users/KurtRMueller","html_url":"https://github.com/KurtRMueller","followers_url":"https://api.github.com/users/KurtRMueller/followers","following_url":"https://api.github.com/users/KurtRMueller/following{/other_user}","gists_url":"https://api.github.com/users/KurtRMueller/gists{/gist_id}","starred_url":"https://api.github.com/users/KurtRMueller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KurtRMueller/subscriptions","organizations_url":"https://api.github.com/users/KurtRMueller/orgs","repos_url":"https://api.github.com/users/KurtRMueller/repos","events_url":"https://api.github.com/users/KurtRMueller/events{/privacy}","received_events_url":"https://api.github.com/users/KurtRMueller/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-08-31T23:03:19Z","updated_at":"2015-11-06T15:56:39Z","closed_at":null,"body":"Hey all, let me know if this is not the right place to bring this up.\r\n\r\nLike thoughtbot's `scenic` gem, the `schema_plus_views` gem gives the developer a way to create database views through the rails api and to capture those views in the app's schema file.\r\n\r\nOne interesting difference is in its [Creating Views](https://github.com/SchemaPlus/schema_plus_views#creating-views) section. You can create views through the `ActiveRecord` api. \r\n\r\nIt gives the following example:\r\n\r\n```\r\ncreate_view :posts_commented_by_staff,  Post.joins(comment: user).where(users: {role: 'staff'}).uniq\r\n```\r\n\r\nI can see an advantage and disadvantage. I can utilize the scopes and associations I've already defined on my models. I don't have to recreate them in a sql file. However, if scopes or `where` predicates change, two developers can have different views depending on when they run the migration.\r\n\r\nWhat do you all think?"},"comment":{"url":"https://api.github.com/repos/thoughtbot/scenic/issues/comments/154447081","html_url":"https://github.com/thoughtbot/scenic/issues/74#issuecomment-154447081","issue_url":"https://api.github.com/repos/thoughtbot/scenic/issues/74","id":154447081,"user":{"login":"derekprior","id":152152,"avatar_url":"https://avatars.githubusercontent.com/u/152152?v=3","gravatar_id":"","url":"https://api.github.com/users/derekprior","html_url":"https://github.com/derekprior","followers_url":"https://api.github.com/users/derekprior/followers","following_url":"https://api.github.com/users/derekprior/following{/other_user}","gists_url":"https://api.github.com/users/derekprior/gists{/gist_id}","starred_url":"https://api.github.com/users/derekprior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derekprior/subscriptions","organizations_url":"https://api.github.com/users/derekprior/orgs","repos_url":"https://api.github.com/users/derekprior/repos","events_url":"https://api.github.com/users/derekprior/events{/privacy}","received_events_url":"https://api.github.com/users/derekprior/received_events","type":"User","site_admin":false},"created_at":"2015-11-06T15:56:38Z","updated_at":"2015-11-06T15:56:38Z","body":"This isn't a feature we're going to consider at this time. Thanks for the discussion, though."}}