seems_rateable 1.0.10 → 1.0.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e92afbf1216b55fc3629fd9dc830ace41d6f74e5
4
- data.tar.gz: 05bcffa91c9f3283436c050b4e4947db993f54d6
3
+ metadata.gz: e273b87f76a38f6c21e25fa78863bcc11f6233ca
4
+ data.tar.gz: 93b78f7f92bf44079c01aba93cb64304b46421cb
5
5
  SHA512:
6
- metadata.gz: 6b0c3a1a4e6eabe2f23b18463a33c122f654bd0449656bc8af3f2d0073878427fdae9016de8b5f47b67a747c302b78da664b61c2fe0ee60bbac509bac70e0544
7
- data.tar.gz: 68e21d5a5865df84608105641c80b2434705e2c92fa7e941ec5f6eee854b0cff3334aa9de5a6f1547a3c2f47216d04ee8cf44d459c415af6b2fac13edabde7e1
6
+ metadata.gz: 0112a624f4a7734ec39753748b0775e5759a99ab8ab30fa5805470ccae382d44d3ee706cf0b478851b2792955125268256a5af60e8979d53db4ae0daf96d6ccc
7
+ data.tar.gz: 1691a6b51152d14b098cb8f856881795e7428359d744905430b2b732a0e2179a6ed804a20ba929b7a3a4a1e1733f41543adc2b1ee163c623ed8722874344b21d
data/README.md CHANGED
@@ -45,7 +45,7 @@ Don't forget to run
45
45
 
46
46
  $ rake db:migrate
47
47
 
48
- To prepare model add <code> seems_rateable </code> to your rateable model file. You can also pass a hash of options to
48
+ To prepare model add <code> seems_rateable </code> to your rateable model file. You can also pass a hash of options to
49
49
  customize the functionality
50
50
 
51
51
  <ul>
@@ -76,7 +76,7 @@ And to object's raters e.g
76
76
  @object.raters(:quantity)
77
77
 
78
78
  To track user's given ratings add <code>seems_rateable_rater</code> to your rater model.
79
- If your rater class is not "User"(e.g "Client" or "Customer") change configuration in initializer generated by this engine.
79
+ If your rater class is not "User"(e.g "Client" or "Customer") change configuration in initializer generated by this engine.
80
80
  Now you can access user's ratings by <code>@user.ratings_given</code>
81
81
 
82
82
  ### Usage
@@ -84,13 +84,13 @@ Now you can access user's ratings by <code>@user.ratings_given</code>
84
84
  To display star rating use helper method <code>rating_for</code> in your view
85
85
 
86
86
  #index.html.erb
87
-
87
+
88
88
  rating_for @post
89
-
89
+
90
90
  rating_for @post, :dimension => :quality, :class => 'post', :id => 'list'
91
-
91
+
92
92
  rating_for @post, :static => true
93
-
93
+
94
94
  You can specify these options :
95
95
  <ul>
96
96
  <li><code>:dimension</code>The dimension of the object</li>
@@ -1,7 +1,7 @@
1
1
  module SeemsRateable
2
- class ApplicationController < ::ApplicationController
3
- rescue_from SeemsRateable::Errors::AlreadyRatedError do |exception|
4
- render :json => {:error => true}
5
- end
6
- end
2
+ class ApplicationController < ::ApplicationController
3
+ rescue_from SeemsRateable::Errors::AlreadyRatedError do |exception|
4
+ render :json => {:error => true}
5
+ end
6
+ end
7
7
  end
@@ -1,13 +1,13 @@
1
1
  require_dependency "seems_rateable/application_controller"
2
2
 
3
3
  module SeemsRateable
4
- class RatingsController < ApplicationController
5
- def create
6
- raise NoCurrentUserInstanceError unless current_user
7
- obj = params[:kls].classify.constantize.find(params[:idBox])
8
- obj.rate(params[:rate].to_i, current_user.id, params[:dimension])
4
+ class RatingsController < ApplicationController
5
+ def create
6
+ raise NoCurrentUserInstanceError unless current_user
7
+ obj = params[:kls].classify.constantize.find(params[:idBox])
8
+ obj.rate(params[:rate].to_i, current_user.id, params[:dimension])
9
9
 
10
- render :json => true
11
- end
12
- end
10
+ render :json => true
11
+ end
12
+ end
13
13
  end
@@ -1,5 +1,5 @@
1
1
  module SeemsRateable
2
- class CachedRating < ActiveRecord::Base
3
- belongs_to :cacheable, :polymorphic => true
4
- end
2
+ class CachedRating < ActiveRecord::Base
3
+ belongs_to :cacheable, :polymorphic => true
4
+ end
5
5
  end
@@ -1,6 +1,6 @@
1
1
  module SeemsRateable
2
- class Rate < ActiveRecord::Base
3
- belongs_to :rater, :class_name => SeemsRateable::Engine.config.owner_class
4
- belongs_to :rateable, :polymorphic => true
5
- end
2
+ class Rate < ActiveRecord::Base
3
+ belongs_to :rater, :class_name => SeemsRateable::Engine.config.owner_class
4
+ belongs_to :rateable, :polymorphic => true
5
+ end
6
6
  end
data/config/routes.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  SeemsRateable::Engine.routes.draw do
2
- resources :ratings, :only => :create
2
+ resources :ratings, :only => :create
3
3
  end
@@ -2,41 +2,41 @@ require 'rails/generators/migration'
2
2
  require 'fileutils'
3
3
 
4
4
  module SeemsRateable
5
- module Generators
6
- class InstallGenerator < ::Rails::Generators::Base
7
- include Rails::Generators::Migration
8
- source_root File.expand_path('../templates', __FILE__)
5
+ module Generators
6
+ class InstallGenerator < ::Rails::Generators::Base
7
+ include Rails::Generators::Migration
8
+ source_root File.expand_path('../templates', __FILE__)
9
9
 
10
- def self.next_migration_number(path)
11
- unless @prev_migration_nr
12
- @prev_migration_nr = Time.now.utc.strftime("%Y%m%d%H%M%S").to_i
13
- else
14
- @prev_migration_nr += 1
15
- end
16
- @prev_migration_nr.to_s
17
- end
10
+ def self.next_migration_number(path)
11
+ unless @prev_migration_nr
12
+ @prev_migration_nr = Time.now.utc.strftime("%Y%m%d%H%M%S").to_i
13
+ else
14
+ @prev_migration_nr += 1
15
+ end
16
+ @prev_migration_nr.to_s
17
+ end
18
18
 
19
- def routegen
20
- route("seems_rateable")
21
- end
19
+ def routegen
20
+ route("seems_rateable")
21
+ end
22
22
 
23
- desc "generating migration files"
24
- def copy_migrations
25
- migration_template "rates_migration.rb", "db/migrate/create_seems_rateable_rates.rb"
26
- migration_template "cached_ratings_migration.rb", "db/migrate/create_seems_rateable_cached_ratings.rb"
27
- end
23
+ desc "generating migration files"
24
+ def copy_migrations
25
+ migration_template "rates_migration.rb", "db/migrate/create_seems_rateable_rates.rb"
26
+ migration_template "cached_ratings_migration.rb", "db/migrate/create_seems_rateable_cached_ratings.rb"
27
+ end
28
28
 
29
- desc "generating initializer"
30
- def copy_initializer
31
- template "initializer.rb", "config/initializers/seems_rateable.rb"
32
- end
29
+ desc "generating initializer"
30
+ def copy_initializer
31
+ template "initializer.rb", "config/initializers/seems_rateable.rb"
32
+ end
33
33
 
34
- desc "generating javascript files"
35
- def copy_javascript_asset
36
- Dir.mkdir "app/assets/javascripts/rateable" unless File.directory?("app/assets/javascripts/rateable")
37
- copy_file "rateable.js.erb", "app/assets/javascripts/rateable/rateable.js.erb" unless File.exists?("app/assets/javascripts/rateable/rateable.js.erb")
38
- copy_file "jRating.js.erb", "app/assets/javascripts/rateable/jRating.js.erb" unless File.exists?("app/assets/javascripts/rateable/jRating.js.erb")
39
- end
40
- end
41
- end
34
+ desc "generating javascript files"
35
+ def copy_javascript_asset
36
+ Dir.mkdir "app/assets/javascripts/rateable" unless File.directory?("app/assets/javascripts/rateable")
37
+ copy_file "rateable.js.erb", "app/assets/javascripts/rateable/rateable.js.erb" unless File.exists?("app/assets/javascripts/rateable/rateable.js.erb")
38
+ copy_file "jRating.js.erb", "app/assets/javascripts/rateable/jRating.js.erb" unless File.exists?("app/assets/javascripts/rateable/jRating.js.erb")
39
+ end
40
+ end
41
+ end
42
42
  end
@@ -1,17 +1,17 @@
1
1
  class CreateSeemsRateableCachedRatings < ActiveRecord::Migration
2
- def self.up
3
- create_table :seems_rateable_cached_ratings do |t|
4
- t.belongs_to :cacheable, :polymorphic => true
5
- t.float :avg, :null => false
6
- t.integer :cnt, :null => false
7
- t.string :dimension
8
- t.integer :cacheable_id, :limit => 8
9
- t.string :cacheable_type
10
- t.timestamps
11
- end
12
- end
2
+ def self.up
3
+ create_table :seems_rateable_cached_ratings do |t|
4
+ t.belongs_to :cacheable, :polymorphic => true
5
+ t.float :avg, :null => false
6
+ t.integer :cnt, :null => false
7
+ t.string :dimension
8
+ t.integer :cacheable_id, :limit => 8
9
+ t.string :cacheable_type
10
+ t.timestamps
11
+ end
12
+ end
13
13
 
14
- def self.down
15
- drop_table :cached_ratings
16
- end
14
+ def self.down
15
+ drop_table :cached_ratings
16
+ end
17
17
  end
@@ -21,5 +21,5 @@ $(document).ready(function(){
21
21
  $('<span class="text-error"><small style="display:inline-block;">You have already rated!</small></span>').insertAfter(element)
22
22
  }
23
23
  });
24
-
24
+
25
25
  });
@@ -15,4 +15,4 @@ class CreateSeemsRateableRates < ActiveRecord::Migration
15
15
  def self.down
16
16
  drop_table :rates
17
17
  end
18
- end
18
+ end
@@ -1,8 +1,10 @@
1
1
  begin
2
- require 'rails'
2
+ require 'rails'
3
3
  rescue LoadError
4
4
  end
5
5
 
6
+ require "jquery-rails"
7
+
6
8
  require "seems_rateable/engine"
7
9
  require "seems_rateable/errors"
8
10
  require "seems_rateable/helpers"
@@ -1,16 +1,16 @@
1
1
  module SeemsRateable
2
- class Engine < ::Rails::Engine
3
- isolate_namespace SeemsRateable
4
-
5
- config.generators do |g|
6
- g.test_framework :rspec, :fixture => false
7
- g.fixture_replacement :factory_girl, :dir => 'spec/factories'
8
- end
9
-
10
- initializer :seems_rateable do
11
- ActiveRecord::Base.send :include, SeemsRateable::Model
12
- ActionView::Base.send :include, SeemsRateable::Helpers
13
- ActionDispatch::Routing::Mapper.send :include, SeemsRateable::Routes
14
- end
15
- end
2
+ class Engine < ::Rails::Engine
3
+ isolate_namespace SeemsRateable
4
+
5
+ config.generators do |g|
6
+ g.test_framework :rspec, :fixture => false
7
+ g.fixture_replacement :factory_girl, :dir => 'spec/factories'
8
+ end
9
+
10
+ initializer :seems_rateable do
11
+ ActiveRecord::Base.send :include, SeemsRateable::Model
12
+ ActionView::Base.send :include, SeemsRateable::Helpers
13
+ ActionDispatch::Routing::Mapper.send :include, SeemsRateable::Routes
14
+ end
15
+ end
16
16
  end
@@ -1,21 +1,21 @@
1
1
  module SeemsRateable
2
- module Errors
3
- class InvalidRateableObjectError < StandardError
4
- def to_s
5
- "Stated object is not rateable. Add 'seems_rateable' to your object's class model."
6
- end
7
- end
2
+ module Errors
3
+ class InvalidRateableObjectError < StandardError
4
+ def to_s
5
+ "Stated object is not rateable. Add 'seems_rateable' to your object's class model."
6
+ end
7
+ end
8
8
 
9
- class NoCurrentUserInstanceError < StandardError
10
- def to_s
11
- "User instance current_user is not available."
12
- end
13
- end
9
+ class NoCurrentUserInstanceError < StandardError
10
+ def to_s
11
+ "User instance current_user is not available."
12
+ end
13
+ end
14
14
 
15
- class AlreadyRatedError < StandardError
16
- def to_s
17
- "User has already rated an object."
15
+ class AlreadyRatedError < StandardError
16
+ def to_s
17
+ "User has already rated an object."
18
+ end
19
+ end
18
20
  end
19
- end
20
- end
21
21
  end
@@ -1,27 +1,27 @@
1
1
  module SeemsRateable
2
- module Helpers
3
- def rating_for(obj, opts={})
4
- raise Errors::InvalidRateableObjectError unless obj.class.respond_to?(:rateable?)
2
+ module Helpers
3
+ def rating_for(obj, opts={})
4
+ raise Errors::InvalidRateableObjectError unless obj.class.respond_to?(:rateable?)
5
5
 
6
- options = {
7
- :dimension => nil,
8
- :static => false,
9
- :class => 'rateable',
10
- :id => nil
11
- }.update(opts)
6
+ options = {
7
+ :dimension => nil,
8
+ :static => false,
9
+ :class => 'rateable',
10
+ :id => nil
11
+ }.update(opts)
12
12
 
13
- content_tag :div, "", "data-average" => obj.average(options[:dimension]) ? obj.average(options[:dimension]).avg : 0, :id => options[:id],
14
- :class => "#{options[:class]}#{jdisabled?(options[:static])}",
15
- "data-id" => obj.id, "data-kls" => obj.class.name, "data-dimension" => options[:dimension]
16
- end
13
+ content_tag :div, "", "data-average" => obj.average(options[:dimension]) ? obj.average(options[:dimension]).avg : 0, :id => options[:id],
14
+ :class => "#{options[:class]}#{jdisabled?(options[:static])}",
15
+ "data-id" => obj.id, "data-kls" => obj.class.name, "data-dimension" => options[:dimension]
16
+ end
17
17
 
18
- def seems_rateable_stylesheet
19
- stylesheet_link_tag "seems_rateable/application", media: "all", "data-turbolinks-track" => true
20
- end
18
+ def seems_rateable_stylesheet
19
+ stylesheet_link_tag "seems_rateable/application", media: "all", "data-turbolinks-track" => true
20
+ end
21
21
 
22
- private
23
- def jdisabled?(option)
24
- " jDisabled" if option || !current_user
25
- end
26
- end
22
+ private
23
+ def jdisabled?(option)
24
+ " jDisabled" if option || !current_user
25
+ end
26
+ end
27
27
  end
@@ -1,111 +1,112 @@
1
1
  require 'active_support/concern'
2
+
2
3
  module SeemsRateable
3
- module Model
4
- extend ActiveSupport::Concern
4
+ module Model
5
+ extend ActiveSupport::Concern
5
6
 
6
- def rate(stars, user_id, dimension=nil)
7
- if !has_rated?(user_id, dimension)
8
- self.rates.create do |r|
9
- r.stars = stars
10
- r.rater_id = user_id
11
- end
12
- update_overall_average_rating(stars, dimension)
13
- elsif has_rated?(user_id, dimension) && can_update?
14
- update_users_rating(stars, user_id, dimension)
15
- else
16
- raise Errors::AlreadyRatedError
17
- end
18
- end
7
+ def rate(stars, user_id, dimension=nil)
8
+ if !has_rated?(user_id, dimension)
9
+ self.rates.create do |r|
10
+ r.stars = stars
11
+ r.rater_id = user_id
12
+ r.dimension = dimension
13
+ end
14
+ update_overall_average_rating(stars, dimension)
15
+ elsif has_rated?(user_id, dimension) && can_update?
16
+ update_users_rating(stars, user_id, dimension)
17
+ else
18
+ raise Errors::AlreadyRatedError
19
+ end
20
+ end
19
21
 
20
- def update_overall_average_rating(stars, dimension=nil)
21
- if average(dimension).nil?
22
- CachedRating.create do |r|
23
- r.avg = stars
24
- r.dimension = dimension
25
- r.cacheable_id = self.id
26
- r.cacheable_type = self.class.name
27
- r.cnt = 1
28
- end
29
- else
30
- r = average(dimension)
31
- r.avg = (r.avg * r.cnt + stars) / (r.cnt+1)
32
- r.cnt += 1
33
- r.save!
34
- end
35
- end
22
+ def update_overall_average_rating(stars, dimension=nil)
23
+ if average(dimension).nil?
24
+ CachedRating.create do |r|
25
+ r.avg = stars
26
+ r.dimension = dimension
27
+ r.cacheable_id = self.id
28
+ r.cacheable_type = self.class.name
29
+ r.cnt = 1
30
+ end
31
+ else
32
+ r = average(dimension)
33
+ r.avg = (r.avg * r.cnt + stars) / (r.cnt+1)
34
+ r.cnt += 1
35
+ r.save!
36
+ end
37
+ end
36
38
 
37
- def update_users_rating(stars, user_id, dimension=nil)
38
- obj = rates(dimension).where(:rater_id => user_id).first
39
- current_record = average(dimension)
40
- current_record.avg = (current_record.avg*current_record.cnt - obj.stars + stars) / (current_record.cnt)
41
- current_record.save!
42
- obj.stars = stars
43
- obj.save!
44
- end
39
+ def update_users_rating(stars, user_id, dimension=nil)
40
+ obj = rates(dimension).where(:rater_id => user_id).first
41
+ current_record = average(dimension)
42
+ current_record.avg = (current_record.avg*current_record.cnt - obj.stars + stars) / (current_record.cnt)
43
+ current_record.save!
44
+ obj.stars = stars
45
+ obj.save!
46
+ end
45
47
 
46
48
 
47
- def average(dimension=nil)
48
- if dimension.nil?
49
- self.send "rate_average_without_dimension"
50
- else
51
- self.send "#{dimension}_average"
52
- end
53
- end
49
+ def average(dimension=nil)
50
+ if dimension.nil?
51
+ self.send "rate_average_without_dimension"
52
+ else
53
+ self.send "#{dimension}_average"
54
+ end
55
+ end
54
56
 
55
- def rates(dimension=nil)
56
- if dimension.nil?
57
- self.send "rates_without_dimension"
58
- else
59
- self.send "#{dimension}_rates"
60
- end
61
- end
57
+ def rates(dimension=nil)
58
+ if dimension.nil?
59
+ self.send "rates_without_dimension"
60
+ else
61
+ self.send "#{dimension}_rates"
62
+ end
63
+ end
62
64
 
63
- def raters(dimension=nil)
64
- if dimension.nil?
65
- self.send "raters_without_dimension"
66
- else
67
- self.send "#{dimension}_raters"
68
- end
69
- end
65
+ def raters(dimension=nil)
66
+ if dimension.nil?
67
+ self.send "raters_without_dimension"
68
+ else
69
+ self.send "#{dimension}_raters"
70
+ end
71
+ end
70
72
 
71
- def has_rated?(user_id, dimension=nil)
72
- record = self.rates(dimension).where(:rater_id => user_id)
73
- record.empty? ? false : true
74
- end
73
+ def has_rated?(user_id, dimension=nil)
74
+ record = self.rates(dimension).where(:rater_id => user_id)
75
+ record.empty? ? false : true
76
+ end
75
77
 
76
- def can_update?
77
- self.class.can_update?
78
- end
78
+ def can_update?
79
+ self.class.can_update?
80
+ end
79
81
 
80
- module ClassMethods
81
- def seems_rateable(opts={})
82
- #has_many :rates_without_dimension, -> { where(dimension: nil) }, :as => :rateable, :class_name => SeemsRateable::Rate, :dependent => :destroy
83
- has_many :rates_without_dimension, :conditions => { dimension: nil }, :as => :rateable, :class_name => SeemsRateable::Rate, :dependent => :destroy
84
- has_many :raters_without_dimension, :through => :rates_without_dimension, :source => :rater
85
- has_one :rate_average_without_dimension, :conditions => { dimension: nil }, :as => :cacheable, :class_name => SeemsRateable::CachedRating, :dependent => :destroy
86
-
87
- @permission = opts[:allow_update] ? true : false
88
-
89
- def self.can_update?
90
- @permission
91
- end
92
-
93
- def self.rateable?
94
- true
95
- end
96
-
97
- if opts[:dimensions].is_a?(Array)
98
- opts[:dimensions].each do |dimension|
99
- has_many :"#{dimension}_rates", :conditions => { dimension: dimension.to_s }, :dependent => :destroy, :class_name => SeemsRateable::Rate, :as => :rateable
100
- has_many :"#{dimension}_raters", :through => :"#{dimension}_rates", :source => :rater
101
- has_one :"#{dimension}_average", :conditions => { dimension: dimension.to_s }, :as => :cacheable, :class_name => SeemsRateable::CachedRating, :dependent => :destroy
102
- end
103
- end
104
- end
105
-
106
- def seems_rateable_rater
107
- has_many :ratings_given, :class_name => SeemsRateable::Rate, :foreign_key => :rater_id
108
- end
109
- end
110
- end
82
+ module ClassMethods
83
+ def seems_rateable(opts={})
84
+ has_many :rates_without_dimension, -> { where(dimension: nil) }, :as => :rateable, :class_name => SeemsRateable::Rate, :dependent => :destroy
85
+ has_many :raters_without_dimension, :through => :rates_without_dimension, :source => :rater
86
+ has_one :rate_average_without_dimension, -> { where(dimension: nil) }, :as => :cacheable, :class_name => SeemsRateable::CachedRating, :dependent => :destroy
87
+
88
+ @permission = opts[:allow_update] ? true : false
89
+
90
+ def self.can_update?
91
+ @permission
92
+ end
93
+
94
+ def self.rateable?
95
+ true
96
+ end
97
+
98
+ if opts[:dimensions].is_a?(Array)
99
+ opts[:dimensions].each do |dimension|
100
+ has_many :"#{dimension}_rates", -> { where(dimension: dimension.to_s) }, :dependent => :destroy, :class_name => SeemsRateable::Rate, :as => :rateable
101
+ has_many :"#{dimension}_raters", :through => :"#{dimension}_rates", :source => :rater
102
+ has_one :"#{dimension}_average", -> { where(dimension: dimension.to_s) }, :as => :cacheable, :class_name => SeemsRateable::CachedRating, :dependent => :destroy
103
+ end
104
+ end
105
+ end
106
+
107
+ def seems_rateable_rater
108
+ has_many :ratings_given, :class_name => SeemsRateable::Rate, :foreign_key => :rater_id
109
+ end
110
+ end
111
+ end
111
112
  end
@@ -1,7 +1,7 @@
1
1
  module SeemsRateable
2
- module Routes
3
- def seems_rateable
4
- mount SeemsRateable::Engine => '/rateable', :as => :rateable
5
- end
6
- end
2
+ module Routes
3
+ def seems_rateable
4
+ mount SeemsRateable::Engine => '/rateable', :as => :rateable
5
+ end
6
+ end
7
7
  end
@@ -1,3 +1,3 @@
1
1
  module SeemsRateable
2
- VERSION = "1.0.10"
2
+ VERSION = "1.0.11"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seems_rateable
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.10
4
+ version: 1.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Toth
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-06 00:00:00.000000000 Z
11
+ date: 2013-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -101,7 +101,6 @@ executables: []
101
101
  extensions: []
102
102
  extra_rdoc_files: []
103
103
  files:
104
- - app/views/layouts/seems_rateable/application.html.erb
105
104
  - app/assets/stylesheets/seems_rateable/application.css
106
105
  - app/assets/javascripts/seems_rateable/application.js
107
106
  - app/assets/images/seems_rateable/stars.png
@@ -109,8 +108,6 @@ files:
109
108
  - app/assets/images/seems_rateable/bg_jRatingInfos.png
110
109
  - app/controllers/seems_rateable/ratings_controller.rb
111
110
  - app/controllers/seems_rateable/application_controller.rb
112
- - app/helpers/seems_rateable/ratings_helper.rb
113
- - app/helpers/seems_rateable/application_helper.rb
114
111
  - app/models/seems_rateable/rate.rb
115
112
  - app/models/seems_rateable/cached_rating.rb
116
113
  - config/routes.rb
@@ -127,7 +124,6 @@ files:
127
124
  - lib/seems_rateable/errors.rb
128
125
  - lib/seems_rateable/engine.rb
129
126
  - lib/seems_rateable/model.rb
130
- - lib/tasks/seems_rateable_tasks.rake
131
127
  - MIT-LICENSE
132
128
  - Rakefile
133
129
  - README.md
@@ -1,4 +0,0 @@
1
- module SeemsRateable
2
- module ApplicationHelper
3
- end
4
- end
@@ -1,4 +0,0 @@
1
- module SeemsRateable
2
- module RatingsHelper
3
- end
4
- end
@@ -1,14 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>SeemsRateable</title>
5
- <%= stylesheet_link_tag "seems_rateable/application", media: "all" %>
6
- <%= javascript_include_tag "seems_rateable/application" %>
7
- <%= csrf_meta_tags %>
8
- </head>
9
- <body>
10
-
11
- <%= yield %>
12
-
13
- </body>
14
- </html>
@@ -1,4 +0,0 @@
1
- # desc "Explaining what the task does"
2
- # task :seems_rateable do
3
- # # Task goes here
4
- # end