Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
base.rb.diff
7a8,15
> def self.options=(options)
> @@options = options
> end
>
> def self.options
> @@options ||= {}
> end
>
261a270,275
> ivs = apply_superclass_variables(subclass)
> return if options[:implicit_dataset] == false
> derive_and_set_dataset(subclass) if not ivs.include?("@dataset")
> end
>
> def apply_superclass_variables(subclass)
270,279c284,293
< unless ivs.include?("@dataset")
< db
< begin
< if self == Model || !@dataset
< subclass.set_dataset(subclass.implicit_table_name) unless subclass.name.empty?
< elsif @dataset
< subclass.set_dataset(@dataset.clone, :inherited=>true)
< end
< rescue
< nil
---
> ivs
> end
>
> def derive_and_set_dataset(subclass)
> db
> begin
> if self == Model || !@dataset
> subclass.set_dataset(subclass.implicit_table_name) unless subclass.name.empty?
> elsif @dataset
> subclass.set_dataset(@dataset.clone, :inherited=>true)
280a295,296
> rescue
> nil
283c299
<
---
>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment