How to integrate acts-as-taggable-on to RailsAdmin?
Asked Answered
D

1

6

Is someone integrate acts-as-taggable-on to RailsAdmin? I'm trying rails_admin_tag_list but it's not working for me.

My environments:

**Gems included by the bundle:
  * actionmailer (3.2.13)
  * actionpack (3.2.13)
  * activemodel (3.2.13)
  * activerecord (3.2.13)
  * activeresource (3.2.13)
  * activesupport (3.2.13)
  * acts-as-taggable-on (2.3.3)
  * acts_as_votable (0.4.0)
  * addressable (2.3.3)
  * arel (3.0.2)
  * bcrypt-ruby (3.0.1)
  * best_in_place (2.1.0)
  * better_errors (0.6.0)
  * bootstrap-sass (2.3.1.0)
  * bootstrap-wysihtml5-rails (0.3.1.19)
  * builder (3.0.4)
  * bundler (1.3.2)
  * cache_digests (0.2.0)
  * cancan (1.6.9)
  * coderay (1.0.9)
  * coffee-rails (3.2.2)
  * coffee-script (2.2.0)
  * coffee-script-source (1.6.2)
  * daemons (1.1.9)
  * database_cleaner (0.9.1)
  * delayed_job (3.0.5)
  * delayed_job_active_record (0.3.3)
  * devise (2.2.3)
  * diff-lcs (1.1.3)
  * erubis (2.7.0)
  * execjs (1.4.0)
  * fabrication (2.6.1)
  * faraday (0.8.7)
  * ffaker (1.15.0)
  * font-awesome-sass-rails (3.0.2.2)
  * haml (4.0.1)
  * hashie (1.2.0)
  * hike (1.2.1)
  * httpauth (0.2.0)
  * i18n (0.6.1)
  * journey (1.0.4)
  * jquery-rails (2.2.1)
  * jquery-ui-rails (3.0.1)
  * json (1.7.7)
  * jwt (0.1.8)
  * kaminari (0.14.1)
  * kgio (2.8.0)
  * koala (1.6.0)
  * mail (2.5.3)
  * mime-types (1.21)
  * multi_json (1.7.2)
  * multipart-post (1.2.0)
  * nested_form (0.3.1)
  * nokogiri (1.5.9)
  * oauth2 (0.8.1)
  * omniauth (1.1.3)
  * omniauth-facebook (1.4.1)
  * omniauth-oauth2 (1.1.1)
  * orm_adapter (0.4.0)
  * pg (0.14.1)
  * polyglot (0.3.3)
  * rack (1.4.5)
  * rack-cache (1.2)
  * rack-pjax (0.7.0)
  * rack-ssl (1.3.3)
  * rack-test (0.6.2)
  * rails (3.2.13)
  * rails_admin (0.4.6)
  * rails_admin_tag_list (0.1.5)
  * railties (3.2.13)
  * raindrops (0.10.0)
  * rake (10.0.4)
  * rdoc (3.12.2)
  * remotipart (1.0.5)
  * rspec-core (2.12.2)
  * rspec-expectations (2.12.1)
  * rspec-mocks (2.12.2)
  * rspec-rails (2.12.2)
  * safe_yaml (0.9.0)
  * sass (3.2.7)
  * sass-rails (3.2.6)
  * simplecov (0.7.1)
  * simplecov-html (0.7.1)
  * sprockets (2.2.2)
  * strong_parameters (0.2.0)
  * thor (0.18.0)
  * tilt (1.3.6)
  * treetop (1.4.12)
  * tzinfo (0.3.37)
  * uglifier (1.3.0)
  * unicorn (4.6.2)
  * warden (1.2.1)
Diadelphous answered 27/3, 2013 at 4:46 Comment(2)
Is there any error? Can i know what is the not working?Thralldom
I have worked on projects where this has been tried. The person in charge of the back end got it working a number of times, but with each rails_admin or rails update the whole thing would break, and tumble out of control. I would highly suggest that you start looking at writing your own backend, as while rails_admin is great for getting things off the ground, it can only get more complicated and outrageously frustrating the more you try to customize it, and the time it saves becomes dwarfed by the time need to maintain a custom rails_admin set up.Wakerife
G
2

Say you have post model,

class Post < ActiveRecord::Base
  attr_accessible :title, :user_id, :content, :tag_list

  acts_as_taggable
end

and in rails_admin.rb under initializers

config.model Post do
  list do
    field :title
    field :tag_list
  end

  edit do
    field :title
    field :tag_list do
      html_attributes do
        {:style => "width:90%"}
      end
    end
    field :content
  end
end

Thats all, Here is a sample project containing the above scenario:

https://github.com/railscash/sample_change_user_role

Gnathonic answered 7/6, 2013 at 4:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.