Sha256: 5b1447042984e5e6671348a45ebc53613f68581dc01d7b4385d8a8b8cf0d4d1c

Contents?: true

Size: 414 Bytes

Versions: 12

Compression:

Stored size: 414 Bytes

Contents

class <%= class_name %>Relation < ROM::Relation<%= "[:#{adapter}]" %>
<% if gateway -%>
  gateway :<%= gateway %>
<% else -%>
  gateway :default
<% end -%>

<% if register_as != dataset -%>
  schema(:<%= dataset %>, as: :<%= register_as %>, infer: true)
<% else -%>
  schema(:<%= dataset %>, infer: true)
<% end -%>

  # define your methods here ie:
  #
  # def all
  #   select(:id, :name).order(:id)
  # end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
rom-rails-2.4.0 lib/generators/rom/relation/templates/relation.rb.erb
rom-rails-2.3.1 lib/generators/rom/relation/templates/relation.rb.erb
rom-rails-2.3.0 lib/generators/rom/relation/templates/relation.rb.erb
rom-rails-2.2.0 lib/generators/rom/relation/templates/relation.rb.erb
rom-rails-2.0.0 lib/generators/rom/relation/templates/relation.rb.erb
rom-rails-1.2.0 lib/generators/rom/relation/templates/relation.rb.erb
rom-rails-1.1.1 lib/generators/rom/relation/templates/relation.rb.erb
rom-rails-1.1.0 lib/generators/rom/relation/templates/relation.rb.erb
rom-rails-1.0.1 lib/generators/rom/relation/templates/relation.rb.erb
rom-rails-1.0.0 lib/generators/rom/relation/templates/relation.rb.erb
rom-rails-1.0.0.rc1 lib/generators/rom/relation/templates/relation.rb.erb
rom-rails-1.0.0.beta1 lib/generators/rom/relation/templates/relation.rb.erb