Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
| Ctrl+C | copy current line (if no selection) |
| Ctrl+X | cut current line (if no selection) |
| Ctrl+⇧+K | delete line |
| Ctrl+↩ | insert line after |
| module ActiveAdmin | |
| module Inputs | |
| class FilterSelectInput < ::Formtastic::Inputs::SelectInput | |
| def extra_input_html_options | |
| { | |
| :class => 'chosen' | |
| } | |
| end | |
| end | |
| end |
Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
| Ctrl+C | copy current line (if no selection) |
| Ctrl+X | cut current line (if no selection) |
| Ctrl+⇧+K | delete line |
| Ctrl+↩ | insert line after |
| ActiveAdmin.register_page "Dashboard" do | |
| menu :priority => 1, :label => proc{ I18n.t("active_admin.dashboard") } | |
| content :title => proc{ I18n.t("active_admin.dashboard") } do | |
| # div :class => "blank_slate_container", :id => "dashboard_default_message" do | |
| # span :class => "blank_slate" do | |
| # span "Welcome to Active Admin. This is the default dashboard page." | |
| # small "To add dashboard sections, checkout 'app/admin/dashboards.rb'" | |
| # end |
| ActiveAdmin::Dashboards.build do | |
| # Add this section in your dashboard... | |
| section "Background Jobs" do | |
| now = Time.now.getgm | |
| ul do | |
| li do | |
| jobs = Delayed::Job.where('failed_at is not null').count(:id) | |
| link_to "#{jobs} failing jobs", admin_jobs_path(q: {failed_at_is_not_null: true}), style: 'color: red' | |
| end |
| # config/initializers/active_admin.rb | |
| ActiveAdmin.setup do |config| | |
| config.current_user_method = :current_user | |
| config.authentication_method = :authenticate_user! | |
| config.before_filter :admin_role_filter | |
| end | |
| # Adding all recource names to Permissions table after ActiveAdmin is loaded |
##References
##Create Rails App
command to make new directory:
mkdir AppName
| # blog post: | |
| # Before using this initializer, you must set up Cancan. First, add the gem to your Gemfile: | |
| # | |
| # gem 'cancan' | |
| # | |
| # Next, generate and edit an Ability class: | |
| # | |
| # rails generate cancan:ability | |
| # |
In order of preference;
Create a Meteor app and put the client_/server_ files in a client/server directories. Also, create a public dir to save the uploaded files.