avatars_for_rails 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,8 @@
1
1
  #class AvatarsController < InheritedResources::Base
2
2
  class AvatarsController < ApplicationController
3
3
  def index
4
- @avatars = Avatar.all
4
+ #@avatars = Avatar.all
5
+ @avatars = Avatar.where({(AvatarsForRails.avatarable_model.to_s + "_id").to_sym => current_avatarable_object.id})
5
6
 
6
7
  respond_to do |format|
7
8
  format.html # index.html.erb
@@ -2,7 +2,7 @@
2
2
  # project in your rails apps through git.
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "avatars_for_rails"
5
- s.version = "0.0.1"
5
+ s.version = "0.0.2"
6
6
  s.authors = ["Jaime Castro Montero"]
7
7
  s.summary = "Avatar manager for rails apps."
8
8
  s.description = "A Rails engine that allows any model to act as avatarable, permitting it to have a complete avatar manager with a few options."
@@ -4,7 +4,7 @@ require 'paperclip'
4
4
 
5
5
  module AvatarsForRails
6
6
 
7
- autoload :AvatarsControllerConfig, 'avatars_for_rails/avatars_controller_config'
7
+ #autoload :AvatarsControllerConfig, 'avatars_for_rails/avatars_controller_config'
8
8
 
9
9
  mattr_accessor :avatarable_model
10
10
 
@@ -18,7 +18,8 @@ module AvatarsForRails
18
18
 
19
19
  config.to_prepare do
20
20
  AvatarsController.class_eval do
21
- include AvatarsForRails::AvatarsControllerConfig
21
+ #include AvatarsForRails::AvatarsControllerConfig
22
+ include AvatarsControllerConfig
22
23
  end
23
24
  end
24
25
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avatars_for_rails
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jaime Castro Montero