Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?
MENU_ITEMS = [ [:item, 'Dashboard', {label: proc{ I18n.t("active_admin.dashboard") }}], [:item, 'Item', {}], [:item, 'Skill', {label: '特技検索'}], [:item, 'Evolution', {label: '進化検索'}], [:category, 'master', [ ['Element', {}], ['BoxKind', {}], ] ], [:item, 'Comment', {}], ] MENU_ITEM_EXCLUDES = %w() def inverted_menu_items MENU_ITEMS.each_with_object([]).with_index do |(source_item, inverted), index|
以前管理画面系gemの比較を書きましたが、どうも最近upminなる新規管理画面系gemを登場したらしいので、どんなものかと思って触ってみました。 現在の管理画面系3大gemである rails_admin activeadmin typus このgemは同じ管理画面生成gemでも、導入しやすさ、カスタマイズ性に関してそれぞれ特色を持っていて、用途によって住み分けされているのですが、これと比較すると、rails_adminに一番近いタイプのgemですね。 つまり、特徴を挙げると、インストールするだけで全てやってくれる。 その代り、カスタマイズしようとすると、幅が狭くて、色々と面倒がついてくるタイプのgemです。 ただ、rails_adminよりはカスタマイズ性は若干高いです。 これがこのgemの特徴でしょう。 それよりもまだまだ新参のgemなので、機能的に追いついていないところもあるので、総合
activeadmin/activeadminを初めて使うことになったので、どういう仕組みになっているのか調べてみた。 TL;DR rails g active_admin:installを実行するとlib/generators/active_admin/install_generator.rbが実行され、ActiveAdmin.routes(self)がconfig/routes.rbに追加される。 app/admin/以下にあるResource定義ファイル内で実行されるActiveAdmin.registerでは、ActiveAdmin::Resourceインスタンスが生成され、動的にResourceごとのcontrollerが生成される。それらはすべてActiveAdmin::ResourceControllerを継承している。 config/routes.rbに追加されたActiv
ActiveAdminをいろいろカスタマイズしてるのでそのメモです。 セルに表示するコンテンツを増やす セルにはもともとデータが1つしか表示されませんが、+で増やすことができます。 ActiveAdmin.register Post do ... index do column :id column :content column :lots_of do |c| span('hoge') + span('fuga') end end ... 改行も入れて見やすくしてやるとなお良し。 ActiveAdmin.register Post do ... index do column :id column :content column :lots_of do |c| content = Array.new content.push("hoge") content.push("fuga") ra
ActiveAdmin has three main table options on the show page of a resource: attributes_table: table for the object at hand (i.e. for the Post#show page, a table for @post) attributes_table_for: table for a related resource (i.e. @post.user) table_for: table for a collection of related resources (i.e. @post.comments) The documentation does not cover these tables in detail, so hopefully this post will
I am using Formtastic 2.1.1 in Rails 3.2 (with Active Admin) and I want to insert a row into my form that does not have an input field present. Is this possible and what is the syntax in the Formtastic DSL to achieve this? Here's an example: form do |f| f.inputs "Model Info" do f.input :title f.input :published f.input :path end end I'd like to do something like this: form do |f| f.inputs "Model I
AcitveAdminは管理画面を自動的に作成してくれる便利なライブラリですが、大幅に拡張するには少し手間がかかりすぎてしまいます。 正直はてなブログやNaverまとめのようなイイ感じの管理画面を作りたいなら自作するのが一番いいと思うのですが、初心者なのでgemとかで何とかしたい!という方のためにActiveAdminを拡張するためのソースをまとめてみました。 実際に使ってみて上手く稼動した&比較的使いやすかったgemだけをチョイスしています。 記事の下書き、投稿済み ActiveAdmin State Machine READMEにはdraft, preview, publishedの3つの記事の状態の作成方法が掲載されてますが、他の状態も簡単に拡張出来ます。 画像をS3に保存 carrierwave 画像のアップロードは他にもpaperclipなどがありますが、今後他のgemと連携する
Did you know ActiveAdmin was awesome? For the last 6 months I tried adapting ActiveAdmin to three projects with pretty different goals. And it was a great success for each of them. However everything comes with a price. ActiveAdmin has excellent DSL but it lacks architectural quality and feature-richness (mainly due to extremely slow development progress). The main goal of this post is to share my
Github https://github.com/gregbell/active_admin Active Admin 公式 カスタマイズはここでほぼわかる。けど英語 http://www.activeadmin.info/ Official Docs https://github.com/gregbell/active_admin/tree/master/docs Active Admin Google Group 登録すると更新メールがすごい https://groups.google.com/forum/#!forum/activeadmin ActiveAdminで管理画面をつくるための10のテクニック http://shakezoomer.com/?p=558 Railsの管理画面を最短時間でつくろう!はじめに見るサイト http://morizyun.github.io/bl
ActiveAdmin を使用すると簡単にデータの管理画面が作れますがデフォルトだとasset周りで問題が発生しやすいのでメモしておきます。 使用したバージョン rails 4.0.2 activeadmin 1.0.0.pre 発生した問題 管理画面以外の画面にもActiveAdminのcssが読み込まれ、ボタン等が管理画面と同じものになる 管理画面以外の画面にもActiveAdminが保持するjQueryが読み込まれ、jQuery Pluginが動作しなくなる どちらもActiveAdminを使用しないページにまでActiveAdminのassetが読み込まれてしまうのが原因です。 rails generate active_admin:install を実行した際にapp/assets/javascripts/active_admin.jsとapp/assets/stylesheet
FlexやRuby on Railsなどで使い方とかを自分が後でわかるようにメモしておくブログ。最近はFlex系に飽きてます。 カテゴリ: Rails ActiveAdmin サイドバーのカスタマイズ 記事インデックス インストールとindexアクションのカスタマイズサイドバーのカスタマイズ・Filterのカスタマイズについての記事はこちら showアクションのカスタマイズの記事はこちらカスタムアクションの記事はこちら はじめて知る方はインストールとindexアクションのカスタマイズ方法の記事をみるとよいかもしれません 今回はindexアクションの際に表示されるサイドバーのカスタマイズの方法です indexアクションのFilterのカスタマイズ Filterのカスタマイズについて説明していきます Filterはindexアクションのサイドバーに表示される内容で以下のようなものです 上記の
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く