This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <%= form_for "", url: books_path, role: "search", method: :get do %> | |
| <%= label_tag("Search by:") %> | |
| <%= select_tag @search_by, options_for_select( | |
| [['Title', 'title'], ['Author', 'author'], ['Classification', 'classification'], | |
| ['Genre', 'genre'], ['Type', 'type_book']]) %> | |
| <%= text_field_tag :search, @search_term, placeholder: "Search..." %> | |
| <%= submit_tag("Search") %> | |
| <% end %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class AddSubTitleToBooks < ActiveRecord::Migration[5.2] | |
| def change | |
| add_column :books, :sub_title, :string | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <% @books.collect{|b| [b.title]}.transpose.each do |thne| %> | |
| <tr> | |
| <% thne.each do |cell| %> | |
| <td><%= cell %></td> | | |
| <% end %> | |
| </tr> | |
| <% end %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # fh-homework-02 | |
| A repository of books that you can search! | |
| ## Soon! | |
| This app powers <Project Name> located [here](Heroku Project URL) | |
| ## Getting Started | |
| ## Software requirements |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="booyah-box col-10 offset-1"> | |
| <h2><i>All Books</i></h2> | |
| <h3><i>Total Books: <%= Book.count %></i></h3> | |
| <table class="table-header"> | |
| <tr> | |
| <th>Title</th> | |
| <th>Author(s)</th> | |
| <th>Genre</th> | |
| <th>Classification</th> | |
| <th>Type</th> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="booyah-box col-10 offset-1"> | |
| <h2><i>All Books</i></h2> | |
| <h3><i>Total Books: <%= Book.count %></i></h3> | |
| <table class="table-header"> | |
| <tr> | |
| <th>Title</th> | |
| <th>Author(s)</th> | |
| <th>Genre</th> | |
| <th>Classification</th> | |
| <th>Type</th> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // C++ program for count in C++ STL for | |
| // array | |
| #include <bits/stdc++.h> | |
| using namespace std; | |
| int main() | |
| { | |
| int arr[] = { 3, 2, 1, 3, 3, 5 }; | |
| int n = sizeof(arr) / sizeof(arr[0]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Animal | |
| def initialize | |
| end | |
| def eat | |
| puts "Nom, nom, nom" | |
| end | |
| end | |
| class Dog < Animal |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Person | |
| def initialize | |
| end | |
| def eat | |
| puts "Nom, nom, nom" | |
| end | |
| def sleep | |
| puts "Need to sleep and recharge" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Person | |
| attr_accessor :name | |
| def initialize(name) | |
| @name = name | |
| end | |
| def eat | |
| puts "Nom, nom, nom" | |
| end |