Top Level Namespace

Defined Under Namespace

Modules: Rails, Superglue

Instance Method Summary collapse

Instance Method Details

#add_member_methodsObject



1
2
3
4
5
6
7
8
9
10
11
12
13
# File 'lib/install/web.rb', line 1

def add_member_methods
  inject_into_file "app/models/application_record.rb", after: "class ApplicationRecord < ActiveRecord::Base\n" do
    "  def self.member_at(index)\n    offset(index).limit(1).first\n  end\n\n  def self.member_by(attr, value)\n    find_by(Hash[attr, value])\n  end\n    RUBY\n  end\nend\n"

#app_js_pathObject



15
16
17
# File 'lib/install/web.rb', line 15

def app_js_path
  "app/javascript/"
end