Created
October 24, 2014 18:18
-
-
Save akirill0v/ab8241b8ea8aa0f8e602 to your computer and use it in GitHub Desktop.
Diff
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
| diff --git a/Gemfile b/Gemfile | |
| index 65641a8..794c14a 100644 | |
| --- a/Gemfile | |
| +++ b/Gemfile | |
| @@ -25,6 +25,7 @@ gem 'sdoc', '~> 0.4.0', group: :doc | |
| # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/sp | |
| gem 'polymer-rails', '~> 0.1.8' | |
| +gem 'haml-rails' | |
| # Use ActiveModel has_secure_password | |
| # gem 'bcrypt', '~> 3.1.7' | |
| diff --git a/Gemfile.lock b/Gemfile.lock | |
| index 3436a69..6cbc959 100644 | |
| --- a/Gemfile.lock | |
| +++ b/Gemfile.lock | |
| @@ -38,6 +38,13 @@ GEM | |
| coffee-script-source (1.7.0) | |
| erubis (2.7.0) | |
| execjs (2.2.1) | |
| + haml (4.0.5) | |
| + tilt | |
| + haml-rails (0.5.3) | |
| + actionpack (>= 4.0.1) | |
| + activesupport (>= 4.0.1) | |
| + haml (>= 3.1, < 5.0) | |
| + railties (>= 4.0.1) | |
| hike (1.2.3) | |
| i18n (0.6.9) | |
| jbuilder (2.1.1) | |
| @@ -115,6 +122,7 @@ PLATFORMS | |
| DEPENDENCIES | |
| coffee-rails (~> 4.0.0) | |
| + haml-rails | |
| jbuilder (~> 2.0) | |
| jquery-rails | |
| pg (= 0.17.1) | |
| diff --git a/app/assets/components/my-navigation/_my-navigation.html.erb b/app/assets/components/my-navigation/_my-navigation | |
| new file mode 100644 | |
| index 0000000..80d07aa | |
| --- /dev/null | |
| +++ b/app/assets/components/my-navigation/_my-navigation.html.erb | |
| @@ -0,0 +1,14 @@ | |
| +<polymer-element name="my-navigation"> | |
| + <template> | |
| + <%= stylesheet_link_tag 'my-navigation/style'%> | |
| + <ul class="navigation"> | |
| + <li><a href="/">Home</a></li> | |
| + <li><a href="/">Contacts</a></li> | |
| + <li><a href="/">Blog</a></li> | |
| + <li><a href="/">Twitter</a></li> | |
| + <li><a href="/">Facebook</a></li> | |
| + </ul> | |
| + </template> | |
| + | |
| +<%= javascript_include_tag "my-navigation/my-navigation"%> | |
| +</polymer-element> | |
| diff --git a/app/assets/components/my-navigation/my-navigation.html.erb b/app/assets/components/my-navigation/my-navigation.h | |
| deleted file mode 100644 | |
| index 80d07aa..0000000 | |
| --- a/app/assets/components/my-navigation/my-navigation.html.erb | |
| +++ /dev/null | |
| @@ -1,14 +0,0 @@ | |
| -<polymer-element name="my-navigation"> | |
| - <template> | |
| - <%= stylesheet_link_tag 'my-navigation/style'%> | |
| - <ul class="navigation"> | |
| - <li><a href="/">Home</a></li> | |
| - <li><a href="/">Contacts</a></li> | |
| - <li><a href="/">Blog</a></li> | |
| - <li><a href="/">Twitter</a></li> | |
| - <li><a href="/">Facebook</a></li> | |
| - </ul> | |
| - </template> | |
| - | |
| -<%= javascript_include_tag "my-navigation/my-navigation"%> | |
| -</polymer-element> | |
| diff --git a/app/assets/components/my-navigation/my-navigation.html.haml b/app/assets/components/my-navigation/my-navigation. | |
| new file mode 100644 | |
| index 0000000..2a88374 | |
| --- /dev/null | |
| +++ b/app/assets/components/my-navigation/my-navigation.html.haml | |
| @@ -0,0 +1,7 @@ | |
| +%polymer-element(name="my-navigation") | |
| + %template | |
| + = stylesheet_link_tag 'my-navigation/style' | |
| + %ul.navigation | |
| + - %w(Home Contacts Blog Twitter Facebook).each do |i| | |
| + %li= link_to i, '/' | |
| += javascript_include_tag "my-navigation/my-navigation" | |
| diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb | |
| index d2f4ec3..acb40f2 100644 | |
| --- a/config/initializers/assets.rb | |
| +++ b/config/initializers/assets.rb | |
| @@ -2,6 +2,7 @@ | |
| # Version of your assets, change this if you want to expire all your assets. | |
| Rails.application.config.assets.version = '1.0' | |
| +Rails.application.assets.register_engine '.haml', Tilt::HamlTemplate | |
| # Precompile additional assets. | |
| # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment