From 8a80c27460af5c05197ac27cb2eb932736d841e9 Mon Sep 17 00:00:00 2001 From: Sergei Date: Sun, 14 Feb 2016 13:56:14 -0800 Subject: [PATCH] Fixed coffee script --- Gemfile | 5 +- Gemfile.lock | 8 +- app/assets/javascripts/application.js | 1 - app/assets/javascripts/friendships.coffee | 3 - app/assets/javascripts/home.coffee | 3 - app/assets/javascripts/landing_page.coffee | 3 - app/assets/javascripts/user.coffee | 3 - app/views/albums/index.html.erb | 88 ++++++---------------- app/views/albums/show.html.erb | 7 ++ app/views/layouts/application.html.erb | 5 +- db/schema.rb | 2 - 11 files changed, 39 insertions(+), 89 deletions(-) delete mode 100644 app/assets/javascripts/friendships.coffee delete mode 100644 app/assets/javascripts/home.coffee delete mode 100644 app/assets/javascripts/landing_page.coffee delete mode 100644 app/assets/javascripts/user.coffee diff --git a/Gemfile b/Gemfile index 66df0b5..48b4732 100644 --- a/Gemfile +++ b/Gemfile @@ -18,7 +18,7 @@ gem 'coffee-script-source', '1.8.0' # Use jquery as the JavaScript library gem 'jquery-rails' # Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks -gem 'turbolinks' +# gem 'turbolinks' # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder gem 'jbuilder', '~> 2.0' # bundle exec rake doc:rails generates the API under doc/api. @@ -29,6 +29,7 @@ gem 'faker' gem 'tinymce-rails' gem 'paperclip', '~> 4.3' gem 'kaminari' +gem 'coffee-rails' # Use ActiveModel has_secure_password # gem 'bcrypt', '~> 3.1.7' @@ -36,7 +37,7 @@ gem 'kaminari' # Use Capistrano for deployment # gem 'capistrano-rails', group: :development -platforms :ruby do +group :production do gem 'unicorn' gem 'pg' end diff --git a/Gemfile.lock b/Gemfile.lock index 0fc79ac..54cf895 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -103,6 +103,7 @@ GEM mime-types mimemagic (= 0.3.0) pg (0.18.4) + pg (0.18.4-x86-mingw32) rack (1.6.4) rack-test (0.6.3) rack (>= 1.0) @@ -160,8 +161,6 @@ GEM tilt (2.0.2) tinymce-rails (4.3.3) railties (>= 3.1.1) - turbolinks (2.5.3) - coffee-rails tzinfo (1.2.2) thread_safe (~> 0.1) tzinfo-data (1.2016.1) @@ -187,6 +186,7 @@ PLATFORMS DEPENDENCIES byebug + coffee-rails coffee-script-source (= 1.8.0) devise faker @@ -200,8 +200,10 @@ DEPENDENCIES sdoc (~> 0.4.0) sqlite3 tinymce-rails - turbolinks tzinfo-data uglifier (>= 1.3.0) unicorn web-console (~> 2.0) + +BUNDLED WITH + 1.11.2 diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 224a108..b49ec16 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -16,7 +16,6 @@ //= require select2.min -///= require turbolinks //= require_tree . //$(function(){ $(document).foundation(); }); diff --git a/app/assets/javascripts/friendships.coffee b/app/assets/javascripts/friendships.coffee deleted file mode 100644 index 24f83d1..0000000 --- a/app/assets/javascripts/friendships.coffee +++ /dev/null @@ -1,3 +0,0 @@ -# Place all the behaviors and hooks related to the matching controller here. -# All this logic will automatically be available in application.js. -# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/javascripts/home.coffee b/app/assets/javascripts/home.coffee deleted file mode 100644 index 24f83d1..0000000 --- a/app/assets/javascripts/home.coffee +++ /dev/null @@ -1,3 +0,0 @@ -# Place all the behaviors and hooks related to the matching controller here. -# All this logic will automatically be available in application.js. -# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/javascripts/landing_page.coffee b/app/assets/javascripts/landing_page.coffee deleted file mode 100644 index 24f83d1..0000000 --- a/app/assets/javascripts/landing_page.coffee +++ /dev/null @@ -1,3 +0,0 @@ -# Place all the behaviors and hooks related to the matching controller here. -# All this logic will automatically be available in application.js. -# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/javascripts/user.coffee b/app/assets/javascripts/user.coffee deleted file mode 100644 index 24f83d1..0000000 --- a/app/assets/javascripts/user.coffee +++ /dev/null @@ -1,3 +0,0 @@ -# Place all the behaviors and hooks related to the matching controller here. -# All this logic will automatically be available in application.js. -# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/views/albums/index.html.erb b/app/views/albums/index.html.erb index 9030f4b..09cdc33 100644 --- a/app/views/albums/index.html.erb +++ b/app/views/albums/index.html.erb @@ -1,70 +1,28 @@
-

ALBUMS

+

<%= current_user.username %>'s Albums

-
- - - -
-
- - - -
-
- - - -
-
- - - -
-
- - - -
-
- - - -
-
- - - -
-
- - - -
-
- - - -
-
- - - -
-
- - - -
-
- - - -
+ + + + + + + <% @albums.each do |album| %> +
+

<%= album.title %>

+ <%= link_to image_tag('http://placehold.it/400x300', class: "img-responsive"), album_show_page_path(username: current_user.username, title: album.title), class: "thumbnail" %> + <%= link_to 'Edit', edit_album_path(album) %>|<%= link_to 'Destroy', album, method: :delete, data: { confirm: 'Are you sure?' } %> + +
+ <% end %> +
+

+ <%= link_to 'Create New Album', album_new_page_path(@album, username: current_user.username) %> +

Listing Albums

@@ -84,9 +42,9 @@ <%= album.user.username %>   <%= album.title %> <%= album.access %> - <%= link_to 'Show', album_show_page_path(username: current_user.username, title: album.title) %> - <%= link_to 'Edit', edit_album_path(album) %> - <%= link_to 'Destroy', album, method: :delete, data: { confirm: 'Are you sure?' } %> + <%= link_to 'Show', album_show_page_path(username: current_user.username, title: album.title) %> + <%= link_to 'Edit', edit_album_path(album) %> + <%= link_to 'Destroy', album, method: :delete, data: { confirm: 'Are you sure?' } %> <% end %> @@ -94,6 +52,4 @@
-
-<%= link_to 'New Album', album_new_page_path(@album, username: current_user.username) %> diff --git a/app/views/albums/show.html.erb b/app/views/albums/show.html.erb index 130880d..8cbc363 100644 --- a/app/views/albums/show.html.erb +++ b/app/views/albums/show.html.erb @@ -180,5 +180,12 @@ $('.pager').bootstrapPaginator(options); +

+ <%= link_to 'Edit Album', edit_album_path(@album) %> +

+

+ <%= link_to 'Back', album_index_page_path(username: current_user.username) %> +

+ <%= link_to 'Edit', edit_album_path(@album) %> | <%= link_to 'Back', album_index_page_path(@album) %> diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 77a0ca9..25cc979 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -11,13 +11,12 @@ <%= stylesheet_link_tag 'application', media: 'all', '../javascripts/jquery-ui-1.11.4.custom/jquery-ui.min.css' => true %> <%= stylesheet_link_tag 'application', 'http://www.shieldui.com/shared/components/latest/css/light-bootstrap/all.min.css' => true %> - <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %> - <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %> + <%= stylesheet_link_tag 'application', media: 'all' %> + <%= javascript_include_tag 'application' %> <%= javascript_include_tag 'javascripts/jquery-ui1.11.4.custom/jquery/jquery.js' => true %> <%= javascript_include_tag '../javascripts/jquery-ui-1.11.4.custom/jquery-ui.min.js' => true %> <%#= javascript_include_tag 'http://www.shieldui.com/shared/components/latest/js/shieldui-all.min.js' => true %> - <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %> <%= csrf_meta_tags %> diff --git a/db/schema.rb b/db/schema.rb index 7b85a2f..2900b9f 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -74,8 +74,6 @@ t.string "phone_number" t.string "location" t.text "about_me" - t.text "provile_avatar" - t.text "profile_avatar" t.string "avatar_file_name" t.string "avatar_content_type" t.integer "avatar_file_size"