Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search functionality ui #54

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
ab0206a
Seeds Database with Videos
Feb 20, 2014
6ce4d36
Building Home Page
Feb 20, 2014
dc4d06d
Creates Home View
Feb 20, 2014
83787e6
Builds Homepage
Feb 20, 2014
938f182
Building Video Show
Feb 20, 2014
9826c9c
Building Video View
Feb 20, 2014
6bc0883
Fixing Bug in Video Show
Feb 20, 2014
4b230a7
Fixes Bug
Feb 20, 2014
920125e
Fixing Image to Match its Object
Feb 20, 2014
3ee7e5d
builds home page
Feb 21, 2014
0293c4b
Creating Category and Seeding Database
Feb 21, 2014
fbd364c
Creates Category Functionality and Improves Image to Object Programming
Feb 21, 2014
7dc0dc4
Works on Category Show view
Feb 21, 2014
decd5cd
Works on Category Show
Feb 21, 2014
100400d
Creates Videos Per Category Pages
Feb 22, 2014
89a0d05
Creates Category View For Each Category
Feb 22, 2014
f437d7a
Successfully Shows All Movies Per Category In a DRY Way
Feb 22, 2014
ce22440
DRYs up my code
Feb 22, 2014
b57bab8
tests video model's ability to save
Feb 23, 2014
52f646f
tests model associations for video and category
Feb 23, 2014
fec30df
tests for models
Feb 23, 2014
4079674
Debugs Tests in category_spec
Feb 23, 2014
019e44c
Cleans up code after kevin's code review
Feb 24, 2014
9c5436a
Uses Shoulda Matchers in Specs
Feb 25, 2014
4826a39
Refactors Preassignment Code According to TA Comments
Feb 25, 2014
92eca76
Trying to create 4 tests cases for video search method
Feb 26, 2014
75647c8
Tests Pass for Search by video's title function
Feb 26, 2014
01637c1
creates search functionality
Feb 26, 2014
41aeba2
Improves Search Functionality
Feb 26, 2014
5ca8be3
removes params[:title] from text_field_tag
Feb 27, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Successfully Shows All Movies Per Category In a DRY Way
  • Loading branch information
Rob Jewell committed Feb 22, 2014
commit f437d7a034fd5dbbef4cb4649d2459b2676ab633
4 changes: 2 additions & 2 deletions app/controllers/categories_controller.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class CategoriesController < ApplicationController
def show
@categories = Category.all
#@categories = Category.all
@videos = Video.all
#@categories = Category.find_by(params[:id])
@categories = Category.find(params[:id])
@comedy = Video.comedy
@drama = Video.drama
@reality = Video.reality
6 changes: 3 additions & 3 deletions app/controllers/videos_controller.rb
Original file line number Diff line number Diff line change
@@ -2,9 +2,9 @@ class VideosController < ApplicationController

def index
@videos = Video.all
@comedy_obj = Category.find(1)
@drama_obj = Category.find(2)
@reality_obj = Category.find(3)
@comedy_category = Category.find(1)
@drama_category = Category.find(2)
@reality_category = Category.find(3)
@comedy = @videos.comedy
@drama = @videos.drama
@reality = @videos.reality
6 changes: 3 additions & 3 deletions app/views/videos/index.html.haml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%article.video_category
%header
%h3
= link_to "#{@comedy_obj.name}", comedies_path(@comedy)
= link_to "#{@comedy_category.name}", category_path(@comedy_category)
.videos.row
- @comedy.limit(6).each do |a|
.video.col-sm-2
@@ -11,7 +11,7 @@
%article.video_category
%header
%h3
= link_to "#{@drama_obj.name}", dramas_path(@drama)
= link_to "#{@drama_category.name}", category_path(@drama_category)
.videos.row
- @drama.limit(6).each do |a|
.video.col-sm-2
@@ -20,7 +20,7 @@
%article.video_category
%header
%h3
= link_to "#{@reality_obj.name}", realities_path(@reality)
= link_to "#{@reality_category.name}", category_path(@reality_category)
.videos.row
- @reality.limit(6).each do |a|
.video.col-sm-2