aspartame 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -2,8 +2,27 @@
2
2
 
3
3
  Instructions:
4
4
 
5
- 1. Add 'aspartame' to gemfile.
6
- 2. Add 'mount Aspartame::Engine => "/aspartame" ' to main app's routes.rb.
7
- 3. Add '*= require aspartame/application' to main app's application.css file.
8
- 4. Make sure you have jquery_rails enabled.
9
- 5. Add '<%= render 'layouts/aspartame/aspartame_header' %>' at the top of the body of main app's application.html.erb file.
5
+ 1. Add 'aspartame' to gemfile and run bundle install.
6
+ 2. Run ```rails generate formtastic:install``` to get the forms working properly afterward). Add to config/initializers/formtastic.rb ```Formtastic::Helpers::FormHelper.builder = FormtasticBootstrap::FormBuilder```
7
+ 3. Run ```rake aspartame:install:migrations``` and then ```rake db:migrate```
8
+ 4. Add ```mount Aspartame::Engine => "/aspartame"``` to main app's routes.rb.
9
+ 5. Add ```*= require aspartame/application``` to main app's application.css file.
10
+ 6. Make sure you have jquery_rails enabled.
11
+ 7. Add ```<%= render 'layouts/aspartame/aspartame_header' %>``` at the top of the body of main app's application.html.erb file.
12
+ 8. Add the following to your application_controller.rb:
13
+
14
+ ```
15
+ before_filter :aspartame_form_variables
16
+
17
+ def aspartame_form_variables
18
+ @aspartame_translation = Aspartame::AspartameTranslation.new
19
+ if request.fullpath.index('?')
20
+ @aspartame_url_string = request.fullpath.slice(0...(request.fullpath.index('?')))
21
+ else
22
+ @aspartame_url_string = request.fullpath
23
+ end
24
+ @aspartame_universal_translations = Aspartame::AspartameTranslation.where(:url => "UNIVERSAL", :language => params[:ln], :status => true)
25
+ @aspartame_translations = Aspartame::AspartameTranslation.where(:url => @aspartame_url_string, :language => params[:ln], :status => true)
26
+ @aspartame_user = Aspartame::AspartameUser.find_by_remember_token(cookies[:aspartame_remember_token])
27
+ end
28
+ ```
@@ -6,6 +6,19 @@ module Aspartame
6
6
  helper Aspartame::ApplicationHelper
7
7
  end
8
8
  end
9
+
10
+ require 'rubygems'
11
+ require "jquery-rails"
12
+ require "bootstrap-sass"
13
+ require "formtastic"
14
+ require "formtastic-bootstrap"
15
+ require "will_paginate"
16
+ require "bootstrap-will_paginate"
17
+ require "bcrypt-ruby"
18
+ require "sass-rails"
19
+ require "jquery-datatables-rails"
20
+ require "jquery-ui-rails"
21
+ require "coffee-rails"
9
22
 
10
23
  # initializer "aspartame.load_controller" do
11
24
  # ActiveSupport.on_load(:action_controller) do
@@ -1,3 +1,3 @@
1
1
  module Aspartame
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aspartame
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: