diff --git a/Gemfile b/Gemfile index 95e6274e8ad41069bf0a66092639a4c41b17dfe2..772932fe496879703559aae63b4383389c76a4d1 100644 --- a/Gemfile +++ b/Gemfile @@ -25,6 +25,7 @@ gem 'omniauth-tumblr' gem 'omniauth-twitter' gem 'twitter', '2.0.2' +gem 'rails_admin' # mail diff --git a/Gemfile.lock b/Gemfile.lock index 5f41c948e3890b3350cb436264214a7dc99b4d88..e84100d7a22b22484a9009a0504437c9f1bb7a75 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -93,6 +93,7 @@ GEM asset_sync (0.3.1) activemodel fog + bbenezech-nested_form (0.0.6) bcrypt-ruby (3.0.1) bootstrap-sass (2.0.2) builder (3.0.0) @@ -119,6 +120,13 @@ GEM ffi (~> 1.0.6) chronic (0.6.7) client_side_validations (3.1.4) + coffee-rails (3.1.1) + coffee-script (>= 2.2.0) + railties (~> 3.1.0) + coffee-script (2.2.0) + coffee-script-source + execjs + coffee-script-source (1.3.1) columnize (0.3.6) cookiejar (0.3.0) crack (0.3.1) @@ -221,6 +229,7 @@ GEM highline (1.6.11) hike (1.2.1) hodel_3000_compliant_logger (0.1.0) + hpricot (0.8.6) http_accept_language (1.0.2) http_parser.rb (0.5.3) i18n (0.6.0) @@ -234,9 +243,16 @@ GEM jquery-rails (1.0.19) railties (~> 3.0) thor (~> 0.14) + jquery-ui-rails (0.2.2) + jquery-rails + railties (>= 3.1.0) json (1.6.6) jwt (0.1.4) json (>= 1.2.4) + kaminari (0.13.0) + actionpack (>= 3.0.0) + activesupport (>= 3.0.0) + railties (>= 3.0.0) kgio (2.7.4) launchy (2.0.3) linecache (0.46) @@ -316,6 +332,9 @@ GEM rack-mount (0.8.3) rack (>= 1.0.0) rack-piwik (0.1.2) + rack-pjax (0.5.9) + hpricot (~> 0.8.6) + rack (~> 1.3) rack-protection (1.2.0) rack rack-rewrite (1.2.1) @@ -333,6 +352,19 @@ GEM railties (= 3.1.4) rails-i18n (0.6.3) i18n (~> 0.5) + rails_admin (0.0.1) + bbenezech-nested_form (~> 0.0.6) + bootstrap-sass (~> 2.0) + builder (~> 3.0) + coffee-rails (~> 3.1) + haml (~> 3.1) + jquery-rails (>= 1.0) + jquery-ui-rails (~> 0.2.2) + kaminari (~> 0.12) + rack-pjax (~> 0.5) + rails (~> 3.1) + remotipart (~> 1.0) + sass-rails (~> 3.1) rails_autolink (1.0.6) rails (~> 3.1) railties (3.1.4) @@ -533,6 +565,7 @@ DEPENDENCIES rack-ssl rails (= 3.1.4) rails-i18n + rails_admin rails_autolink redcarpet (= 2.0.1) remotipart (~> 1.0) diff --git a/config/initializers/rails_admin.rb b/config/initializers/rails_admin.rb index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..bde0f64be20855a17ed185a5b17723ff67b049da 100644 --- a/config/initializers/rails_admin.rb +++ b/config/initializers/rails_admin.rb @@ -0,0 +1,1144 @@ +# RailsAdmin config file. Generated on March 24, 2012 15:34 +# See github.com/sferik/rails_admin for more informations +unless Rails.env.production? +RailsAdmin.config do |config| + config.authorize_with do + redirect_to main_app.root_path unless current_user.try(:admin?) + end + + # If your default_local is different from :en, uncomment the following 2 lines and set your default locale here: + # require 'i18n' + # I18n.default_locale = :de + + config.current_user_method { current_user } # auto-generated + + # If you want to track changes on your models: + # config.audit_with :history, User + + # Or with a PaperTrail: (you need to install it first) + # config.audit_with :paper_trail, User + + # Set the admin name here (optional second array element will appear in a beautiful RailsAdmin red ©) + config.main_app_name = ['Diaspora', 'Admin'] + # or for a dynamic name: + # config.main_app_name = Proc.new { |controller| [Rails.application.engine_name.titleize, controller.params['action'].titleize] } + + + # ==> Global show view settings + # Display empty fields in show views + # config.compact_show_view = false + + # ==> Global list view settings + # Number of default rows per-page: + # config.default_items_per_page = 20 + + # ==> Included models + # Add all excluded models here: + config.excluded_models = [ActivityStreams::Photo, AspectMembership, AspectVisibility, ShareVisibility, ConversationVisibility, NotificationActor, Notifications::AlsoCommented, Notifications::CommentOnPost, Notifications::Liked, Notifications::Mentioned, Notifications::PrivateMessage, Notifications::RequestAccepted, Notifications::Reshared, Notifications::StartedSharing, Reshare, ServiceUser, Services::Facebook, Services::Tumblr, Services::Twitter, UserPreference] + + # Add models here if you want to go 'whitelist mode': + # config.included_models = [AccountDeletion, ActivityStreams::Photo, ActsAsTaggableOn::Tag, Aspect, AspectMembership, AspectVisibility, Block, Comment, Contact, Conversation, ConversationVisibility, Invitation, InvitationCode, Like, Mention, Message, Notification, NotificationActor, Notifications::AlsoCommented, Notifications::CommentOnPost, Notifications::Liked, Notifications::Mentioned, Notifications::PrivateMessage, Notifications::RequestAccepted, Notifications::Reshared, Notifications::StartedSharing, OEmbedCache, Participation, Person, Photo, Pod, Post, Profile, Reshare, Service, ServiceUser, Services::Facebook, Services::Tumblr, Services::Twitter, ShareVisibility, StatusMessage, TagFollowing, User, UserPreference] + + # Application wide tried label methods for models' instances + # config.label_methods << :description # Default is [:name, :title] + + # ==> Global models configuration + # config.models do + # # Configuration here will affect all included models in all scopes, handle with care! + # + # list do + # # Configuration here will affect all included models in list sections (same for show, export, edit, update, create) + # + # fields_of_type :date do + # # Configuration here will affect all date fields, in the list section, for all included models. See README for a comprehensive type list. + # end + # end + # end + # + # ==> Model specific configuration + # Keep in mind that *all* configuration blocks are optional. + # RailsAdmin will try his best to provide the best defaults for each section, for each field. + # Try to override as few things as possible, in the most generic way. Try to avoid setting labels for models and attributes, use ActiveRecord I18n API instead. + # Less code is better code! + # config.model MyModel do + # # Cross-section field configuration + # object_label_method :name # Name of the method called for pretty printing an *instance* of ModelName + # label 'My model' # Name of ModelName (smartly defaults to ActiveRecord's I18n API) + # label_plural 'My models' # Same, plural + # weight -1 # Navigation priority. Bigger is higher. + # parent OtherModel # Set parent model for navigation. MyModel will be nested below. OtherModel will be on first position of the dropdown + # navigation_label # Sets dropdown entry's name in navigation. Only for parents! + # # Section specific configuration: + # list do + # filters [:id, :name] # Array of field names which filters should be shown by default in the table header + # items_per_page 100 # Override default_items_per_page + # sort_by :id # Sort column (default is primary key) + # sort_reverse true # Sort direction (default is true for primary key, last created first) + # # Here goes the fields configuration for the list view + # end + # end + + # Your model's configuration, to help you get started: + + # All fields marked as 'hidden' won't be shown anywhere in the rails_admin unless you mark them as visible. (visible(true)) + + # config.model AccountDeletion do + # # Found associations: + # configure :person, :belongs_to_association # # Found columns: + # configure :id, :integer + # configure :diaspora_handle, :string + # configure :person_id, :integer # Hidden # # Sections: + # list do; end + # export do; end + # show do; end + # edit do; end + # create do; end + # update do; end + # end + # config.model ActivityStreams::Photo do + # # Found associations: + # configure :author, :belongs_to_association + # configure :reshares, :has_many_association + # configure :o_embed_cache, :belongs_to_association + # configure :likes, :has_many_association + # configure :dislikes, :has_many_association + # configure :comments, :has_many_association + # configure :aspect_visibilities, :has_many_association + # configure :aspects, :has_many_association + # configure :share_visibilities, :has_many_association + # configure :contacts, :has_many_association + # configure :participations, :has_many_association + # configure :mentions, :has_many_association + # configure :resharers, :has_many_association # # Found columns: + # configure :id, :integer + # configure :author_id, :integer # Hidden + # configure :public, :boolean + # configure :diaspora_handle, :string + # configure :guid, :string + # configure :pending, :boolean + # configure :type, :string + # configure :text, :text + # configure :remote_photo_path, :text + # configure :remote_photo_name, :string + # configure :random_string, :string + # configure :processed_image, :string + # configure :created_at, :datetime + # configure :updated_at, :datetime + # configure :unprocessed_image, :string + # configure :object_url, :string + # configure :image_url, :string + # configure :image_height, :integer + # configure :image_width, :integer + # configure :provider_display_name, :string + # configure :actor_url, :string + # configure :objectId, :string + # configure :root_guid, :string # Hidden + # configure :status_message_guid, :string + # configure :likes_count, :integer + # configure :comments_count, :integer + # configure :o_embed_cache_id, :integer # Hidden + # configure :reshares_count, :integer + # configure :interacted_at, :datetime # # Sections: + # list do; end + # export do; end + # show do; end + # edit do; end + # create do; end + # update do; end + # end + # config.model ActsAsTaggableOn::Tag do + # # Found associations: + # configure :taggings, :has_many_association # Hidden # # Found columns: + # configure :id, :integer + # configure :name, :string # # Sections: + # list do; end + # export do; end + # show do; end + # edit do; end + # create do; end + # update do; end + # end + # config.model Aspect do + # # Found associations: + # configure :user, :belongs_to_association + # configure :aspect_memberships, :has_many_association + # configure :contacts, :has_many_association + # configure :aspect_visibilities, :has_many_association + # configure :posts, :has_many_association + # configure :photos, :has_many_association # # Found columns: + # configure :id, :integer + # configure :name, :string + # configure :user_id, :integer # Hidden + # configure :created_at, :datetime + # configure :updated_at, :datetime + # configure :contacts_visible, :boolean + # configure :order_id, :integer # # Sections: + # list do; end + # export do; end + # show do; end + # edit do; end + # create do; end + # update do; end + # end + # config.model AspectMembership do + # # Found associations: + # configure :aspect, :belongs_to_association + # configure :contact, :belongs_to_association + # configure :user, :has_one_association + # configure :person, :has_one_association # # Found columns: + # configure :id, :integer + # configure :aspect_id, :integer # Hidden + # configure :contact_id, :integer # Hidden + # configure :created_at, :datetime + # configure :updated_at, :datetime # # Sections: + # list do; end + # export do; end + # show do; end + # edit do; end + # create do; end + # update do; end + # end + # config.model AspectVisibility do + # # Found associations: + # configure :shareable, :polymorphic_association + # configure :aspect, :belongs_to_association # # Found columns: + # configure :id, :integer + # configure :shareable_id, :integer # Hidden + # configure :shareable_type, :string # Hidden + # configure :aspect_id, :integer # Hidden + # configure :created_at, :datetime + # configure :updated_at, :datetime # # Sections: + # list do; end + # export do; end + # show do; end + # edit do; end + # create do; end + # update do; end + # end + # config.model Block do + # # Found associations: + # configure :user, :belongs_to_association + # configure :person, :belongs_to_association # # Found columns: + # configure :id, :integer + # configure :user_id, :integer # Hidden + # configure :person_id, :integer # Hidden # # Sections: + # list do; end + # export do; end + # show do; end + # edit do; end + # create do; end + # update do; end + # end + # config.model Comment do + # # Found associations: + # configure :commentable, :polymorphic_association + # configure :author, :belongs_to_association + # configure :likes, :has_many_association + # configure :dislikes, :has_many_association + # configure :taggings, :has_many_association # Hidden + # configure :base_tags, :has_many_association + # configure :tag_taggings, :has_many_association # Hidden + # configure :tags, :has_many_association # # Found columns: + # configure :id, :integer + # configure :text, :text + # configure :commentable_id, :integer # Hidden + # configure :commentable_type, :string # Hidden + # configure :author_id, :integer # Hidden + # configure :guid, :string + # configure :author_signature, :text + # configure :parent_author_signature, :text + # configure :created_at, :datetime + # configure :updated_at, :datetime + # configure :likes_count, :integer # # Sections: + # list do; end + # export do; end + # show do; end + # edit do; end + # create do; end + # update do; end + # end + # config.model Contact do + # # Found associations: + # configure :user, :belongs_to_association + # configure :person, :belongs_to_association + # configure :aspect_memberships, :has_many_association + # configure :aspects, :has_many_association + # configure :share_visibilities, :has_many_association + # configure :posts, :has_many_association # # Found columns: + # configure :id, :integer + # configure :user_id, :integer # Hidden + # configure :person_id, :integer # Hidden + # configure :created_at, :datetime + # configure :updated_at, :datetime + # configure :sharing, :boolean + # configure :receiving, :boolean # # Sections: + # list do; end + # export do; end + # show do; end + # edit do; end + # create do; end + # update do; end + # end + # config.model Conversation do + # # Found associations: + # configure :author, :belongs_to_association + # configure :conversation_visibilities, :has_many_association + # configure :participants, :has_many_association + # configure :messages, :has_many_association # # Found columns: + # configure :id, :integer + # configure :subject, :string + # configure :guid, :string + # configure :author_id, :integer # Hidden + # configure :created_at, :datetime + # configure :updated_at, :datetime # # Sections: + # list do; end + # export do; end + # show do; end + # edit do; end + # create do; end + # update do; end + # end + # config.model ConversationVisibility do + # # Found associations: + # configure :conversation, :belongs_to_association + # configure :person, :belongs_to_association # # Found columns: + # configure :id, :integer + # configure :conversation_id, :integer # Hidden + # configure :person_id, :integer # Hidden + # configure :unread, :integer + # configure :created_at, :datetime + # configure :updated_at, :datetime # # Sections: + # list do; end + # export do; end + # show do; end + # edit do; end + # create do; end + # update do; end + # end + # config.model Invitation do + # # Found associations: + # configure :sender, :belongs_to_association + # configure :recipient, :belongs_to_association + # configure :aspect, :belongs_to_association # # Found columns: + # configure :id, :integer + # configure :message, :text + # configure :sender_id, :integer # Hidden + # configure :recipient_id, :integer # Hidden + # configure :aspect_id, :integer # Hidden + # configure :created_at, :datetime + # configure :updated_at, :datetime + # configure :service, :string + # configure :identifier, :string + # configure :admin, :boolean + # configure :language, :string # # Sections: + # list do; end + # export do; end + # show do; end + # edit do; end + # create do; end + # update do; end + # end + # config.model InvitationCode do + # # Found associations: + # configure :user, :belongs_to_association # # Found columns: + # configure :id, :integer + # configure :token, :string + # configure :user_id, :integer # Hidden + # configure :count, :integer + # configure :created_at, :datetime + # configure :updated_at, :datetime # # Sections: + # list do; end + # export do; end + # show do; end + # edit do; end + # create do; end + # update do; end + # end + # config.model Like do + # # Found associations: + # configure :target, :polymorphic_association + # configure :author, :belongs_to_association # # Found columns: + # configure :id, :integer + # configure :positive, :boolean + # configure :target_id, :integer # Hidden + # configure :target_type, :string # Hidden + # configure :author_id, :integer # Hidden + # configure :guid, :string + # configure :author_signature, :text + # configure :parent_author_signature, :text + # configure :created_at, :datetime + # configure :updated_at, :datetime # # Sections: + # list do; end + # export do; end + # show do; end + # edit do; end + # create do; end + # update do; end + # end + # config.model Mention do + # # Found associations: + # configure :post, :belongs_to_association + # configure :person, :belongs_to_association # # Found columns: + # configure :id, :integer + # configure :post_id, :integer # Hidden + # configure :person_id, :integer # Hidden # # Sections: + # list do; end + # export do; end + # show do; end + # edit do; end + # create do; end + # update do; end + # end + # config.model Message do + # # Found associations: + # configure :conversation, :belongs_to_association + # configure :author, :belongs_to_association # # Found columns: + # configure :id, :integer + # configure :conversation_id, :integer # Hidden + # configure :author_id, :integer # Hidden + # configure :guid, :string + # configure :text, :text + # configure :created_at, :datetime + # configure :updated_at, :datetime + # configure :author_signature, :text + # configure :parent_author_signature, :text # # Sections: + # list do; end + # export do; end + # show do; end + # edit do; end + # create do; end + # update do; end + # end + # config.model Notification do + # # Found associations: + # configure :target, :polymorphic_association + # configure :recipient, :belongs_to_association + # configure :notification_actors, :has_many_association + # configure :actors, :has_many_association # # Found columns: + # configure :id, :integer + # configure :target_type, :string # Hidden + # configure :target_id, :integer # Hidden + # configure :recipient_id, :integer # Hidden + # configure :unread, :boolean + # configure :created_at, :datetime + # configure :updated_at, :datetime + # configure :type, :string # # Sections: + # list do; end + # export do; end + # show do; end + # edit do; end + # create do; end + # update do; end + # end + # config.model NotificationActor do + # # Found associations: + # configure :notification, :belongs_to_association + # configure :person, :belongs_to_association # # Found columns: + # configure :id, :integer + # configure :notification_id, :integer # Hidden + # configure :person_id, :integer # Hidden + # configure :created_at, :datetime + # configure :updated_at, :datetime # # Sections: + # list do; end + # export do; end + # show do; end + # edit do; end + # create do; end + # update do; end + # end + # config.model Notifications::AlsoCommented do + # # Found associations: + # configure :target, :polymorphic_association + # configure :recipient, :belongs_to_association + # configure :notification_actors, :has_many_association + # configure :actors, :has_many_association # # Found columns: + # configure :id, :integer + # configure :target_type, :string # Hidden + # configure :target_id, :integer # Hidden + # configure :recipient_id, :integer # Hidden + # configure :unread, :boolean + # configure :created_at, :datetime + # configure :updated_at, :datetime + # configure :type, :string # # Sections: + # list do; end + # export do; end + # show do; end + # edit do; end + # create do; end + # update do; end + # end + # config.model Notifications::CommentOnPost do + # # Found associations: + # configure :target, :polymorphic_association + # configure :recipient, :belongs_to_association + # configure :notification_actors, :has_many_association + # configure :actors, :has_many_association # # Found columns: + # configure :id, :integer + # configure :target_type, :string # Hidden + # configure :target_id, :integer # Hidden + # configure :recipient_id, :integer # Hidden + # configure :unread, :boolean + # configure :created_at, :datetime + # configure :updated_at, :datetime + # configure :type, :string # # Sections: + # list do; end + # export do; end + # show do; end + # edit do; end + # create do; end + # update do; end + # end + # config.model Notifications::Liked do + # # Found associations: + # configure :target, :polymorphic_association + # configure :recipient, :belongs_to_association + # configure :notification_actors, :has_many_association + # configure :actors, :has_many_association # # Found columns: + # configure :id, :integer + # configure :target_type, :string # Hidden + # configure :target_id, :integer # Hidden + # configure :recipient_id, :integer # Hidden + # configure :unread, :boolean + # configure :created_at, :datetime + # configure :updated_at, :datetime + # configure :type, :string # # Sections: + # list do; end + # export do; end + # show do; end + # edit do; end + # create do; end + # update do; end + # end + # config.model Notifications::Mentioned do + # # Found associations: + # configure :target, :polymorphic_association + # configure :recipient, :belongs_to_association + # configure :notification_actors, :has_many_association + # configure :actors, :has_many_association # # Found columns: + # configure :id, :integer + # configure :target_type, :string # Hidden + # configure :target_id, :integer # Hidden + # configure :recipient_id, :integer # Hidden + # configure :unread, :boolean + # configure :created_at, :datetime + # configure :updated_at, :datetime + # configure :type, :string # # Sections: + # list do; end + # export do; end + # show do; end + # edit do; end + # create do; end + # update do; end + # end + # config.model Notifications::PrivateMessage do + # # Found associations: + # configure :target, :polymorphic_association + # configure :recipient, :belongs_to_association + # configure :notification_actors, :has_many_association + # configure :actors, :has_many_association # # Found columns: + # configure :id, :integer + # configure :target_type, :string # Hidden + # configure :target_id, :integer # Hidden + # configure :recipient_id, :integer # Hidden + # configure :unread, :boolean + # configure :created_at, :datetime + # configure :updated_at, :datetime + # configure :type, :string # # Sections: + # list do; end + # export do; end + # show do; end + # edit do; end + # create do; end + # update do; end + # end + # config.model Notifications::RequestAccepted do + # # Found associations: + # configure :target, :polymorphic_association + # configure :recipient, :belongs_to_association + # configure :notification_actors, :has_many_association + # configure :actors, :has_many_association # # Found columns: + # configure :id, :integer + # configure :target_type, :string # Hidden + # configure :target_id, :integer # Hidden + # configure :recipient_id, :integer # Hidden + # configure :unread, :boolean + # configure :created_at, :datetime + # configure :updated_at, :datetime + # configure :type, :string # # Sections: + # list do; end + # export do; end + # show do; end + # edit do; end + # create do; end + # update do; end + # end + # config.model Notifications::Reshared do + # # Found associations: + # configure :target, :polymorphic_association + # configure :recipient, :belongs_to_association + # configure :notification_actors, :has_many_association + # configure :actors, :has_many_association # # Found columns: + # configure :id, :integer + # configure :target_type, :string # Hidden + # configure :target_id, :integer # Hidden + # configure :recipient_id, :integer # Hidden + # configure :unread, :boolean + # configure :created_at, :datetime + # configure :updated_at, :datetime + # configure :type, :string # # Sections: + # list do; end + # export do; end + # show do; end + # edit do; end + # create do; end + # update do; end + # end + # config.model Notifications::StartedSharing do + # # Found associations: + # configure :target, :polymorphic_association + # configure :recipient, :belongs_to_association + # configure :notification_actors, :has_many_association + # configure :actors, :has_many_association # # Found columns: + # configure :id, :integer + # configure :target_type, :string # Hidden + # configure :target_id, :integer # Hidden + # configure :recipient_id, :integer # Hidden + # configure :unread, :boolean + # configure :created_at, :datetime + # configure :updated_at, :datetime + # configure :type, :string # # Sections: + # list do; end + # export do; end + # show do; end + # edit do; end + # create do; end + # update do; end + # end + # config.model OEmbedCache do + # # Found associations: + # configure :posts, :has_many_association # # Found columns: + # configure :id, :integer + # configure :url, :string + # configure :data, :serialized # # Sections: + # list do; end + # export do; end + # show do; end + # edit do; end + # create do; end + # update do; end + # end + # config.model Participation do + # # Found associations: + # configure :target, :polymorphic_association + # configure :author, :belongs_to_association # # Found columns: + # configure :id, :integer + # configure :guid, :string + # configure :target_id, :integer # Hidden + # configure :target_type, :string # Hidden + # configure :author_id, :integer # Hidden + # configure :author_signature, :text + # configure :parent_author_signature, :text + # configure :created_at, :datetime + # configure :updated_at, :datetime # # Sections: + # list do; end + # export do; end + # show do; end + # edit do; end + # create do; end + # update do; end + # end + # config.model Person do + # # Found associations: + # configure :owner, :belongs_to_association + # configure :profile, :has_one_association + # configure :contacts, :has_many_association + # configure :posts, :has_many_association + # configure :photos, :has_many_association + # configure :comments, :has_many_association + # configure :participations, :has_many_association + # configure :notification_actors, :has_many_association + # configure :notifications, :has_many_association + # configure :mentions, :has_many_association # # Found columns: + # configure :id, :integer + # configure :guid, :string + # configure :url, :text + # configure :diaspora_handle, :string + # configure :serialized_public_key, :text + # configure :owner_id, :integer # Hidden + # configure :created_at, :datetime + # configure :updated_at, :datetime + # configure :closed_account, :boolean # # Sections: + # list do; end + # export do; end + # show do; end + # edit do; end + # create do; end + # update do; end + # end + # config.model Photo do + # # Found associations: + # configure :author, :belongs_to_association + # configure :status_message, :belongs_to_association + # configure :comments, :has_many_association + # configure :aspect_visibilities, :has_many_association + # configure :aspects, :has_many_association + # configure :share_visibilities, :has_many_association + # configure :contacts, :has_many_association # # Found columns: + # configure :id, :integer + # configure :tmp_old_id, :integer + # configure :author_id, :integer # Hidden + # configure :public, :boolean + # configure :diaspora_handle, :string + # configure :guid, :string + # configure :pending, :boolean + # configure :text, :text + # configure :remote_photo_path, :text + # configure :remote_photo_name, :string + # configure :random_string, :string + # configure :processed_image, :carrierwave + # configure :created_at, :datetime + # configure :updated_at, :datetime + # configure :unprocessed_image, :carrierwave + # configure :status_message_guid, :string # Hidden + # configure :comments_count, :integer # # Sections: + # list do; end + # export do; end + # show do; end + # edit do; end + # create do; end + # update do; end + # end + # config.model Pod do + # # Found associations: + # # Found columns: + # configure :id, :integer + # configure :host, :string + # configure :ssl, :boolean + # configure :created_at, :datetime + # configure :updated_at, :datetime # # Sections: + # list do; end + # export do; end + # show do; end + # edit do; end + # create do; end + # update do; end + # end + # config.model Post do + # # Found associations: + # configure :author, :belongs_to_association + # configure :reshares, :has_many_association + # configure :o_embed_cache, :belongs_to_association + # configure :likes, :has_many_association + # configure :dislikes, :has_many_association + # configure :comments, :has_many_association + # configure :aspect_visibilities, :has_many_association + # configure :aspects, :has_many_association + # configure :share_visibilities, :has_many_association + # configure :contacts, :has_many_association + # configure :participations, :has_many_association + # configure :mentions, :has_many_association + # configure :resharers, :has_many_association # # Found columns: + # configure :id, :integer + # configure :author_id, :integer # Hidden + # configure :public, :boolean + # configure :diaspora_handle, :string + # configure :guid, :string + # configure :pending, :boolean + # configure :type, :string + # configure :text, :text + # configure :remote_photo_path, :text + # configure :remote_photo_name, :string + # configure :random_string, :string + # configure :processed_image, :string + # configure :created_at, :datetime + # configure :updated_at, :datetime + # configure :unprocessed_image, :string + # configure :object_url, :string + # configure :image_url, :string + # configure :image_height, :integer + # configure :image_width, :integer + # configure :provider_display_name, :string + # configure :actor_url, :string + # configure :objectId, :string + # configure :root_guid, :string # Hidden + # configure :status_message_guid, :string + # configure :likes_count, :integer + # configure :comments_count, :integer + # configure :o_embed_cache_id, :integer # Hidden + # configure :reshares_count, :integer + # configure :interacted_at, :datetime # # Sections: + # list do; end + # export do; end + # show do; end + # edit do; end + # create do; end + # update do; end + # end + # config.model Profile do + # # Found associations: + # configure :person, :belongs_to_association + # configure :taggings, :has_many_association # Hidden + # configure :base_tags, :has_many_association + # configure :tag_taggings, :has_many_association # Hidden + # configure :tags, :has_many_association # # Found columns: + # configure :id, :integer + # configure :diaspora_handle, :string + # configure :first_name, :string + # configure :last_name, :string + # configure :image_url, :string + # configure :image_url_small, :string + # configure :image_url_medium, :string + # configure :birthday, :date + # configure :gender, :string + # configure :bio, :text + # configure :searchable, :boolean + # configure :person_id, :integer # Hidden + # configure :created_at, :datetime + # configure :updated_at, :datetime + # configure :location, :string + # configure :full_name, :string + # configure :nsfw, :boolean # # Sections: + # list do; end + # export do; end + # show do; end + # edit do; end + # create do; end + # update do; end + # end + # config.model Reshare do + # # Found associations: + # configure :author, :belongs_to_association + # configure :reshares, :has_many_association + # configure :o_embed_cache, :belongs_to_association + # configure :likes, :has_many_association + # configure :dislikes, :has_many_association + # configure :comments, :has_many_association + # configure :aspect_visibilities, :has_many_association + # configure :aspects, :has_many_association + # configure :share_visibilities, :has_many_association + # configure :contacts, :has_many_association + # configure :participations, :has_many_association + # configure :mentions, :has_many_association + # configure :resharers, :has_many_association # # Found columns: + # configure :id, :integer + # configure :author_id, :integer # Hidden + # configure :public, :boolean + # configure :diaspora_handle, :string + # configure :guid, :string + # configure :pending, :boolean + # configure :type, :string + # configure :text, :text + # configure :remote_photo_path, :text + # configure :remote_photo_name, :string + # configure :random_string, :string + # configure :processed_image, :string + # configure :created_at, :datetime + # configure :updated_at, :datetime + # configure :unprocessed_image, :string + # configure :object_url, :string + # configure :image_url, :string + # configure :image_height, :integer + # configure :image_width, :integer + # configure :provider_display_name, :string + # configure :actor_url, :string + # configure :objectId, :string + # configure :root_guid, :string # Hidden + # configure :status_message_guid, :string + # configure :likes_count, :integer + # configure :comments_count, :integer + # configure :o_embed_cache_id, :integer # Hidden + # configure :reshares_count, :integer + # configure :interacted_at, :datetime # # Sections: + # list do; end + # export do; end + # show do; end + # edit do; end + # create do; end + # update do; end + # end + # config.model Service do + # # Found associations: + # configure :user, :belongs_to_association + # configure :service_users, :has_many_association # # Found columns: + # configure :id, :integer + # configure :type, :string + # configure :user_id, :integer # Hidden + # configure :uid, :string + # configure :access_token, :string + # configure :access_secret, :string + # configure :nickname, :string + # configure :created_at, :datetime + # configure :updated_at, :datetime # # Sections: + # list do; end + # export do; end + # show do; end + # edit do; end + # create do; end + # update do; end + # end + # config.model ServiceUser do + # # Found associations: + # configure :service, :belongs_to_association + # configure :person, :belongs_to_association + # configure :contact, :belongs_to_association + # configure :invitation, :belongs_to_association # # Found columns: + # configure :id, :integer + # configure :uid, :string + # configure :name, :string + # configure :photo_url, :string + # configure :service_id, :integer # Hidden + # configure :person_id, :integer # Hidden + # configure :contact_id, :integer # Hidden + # configure :request_id, :integer + # configure :invitation_id, :integer # Hidden + # configure :created_at, :datetime + # configure :updated_at, :datetime + # configure :username, :string # # Sections: + # list do; end + # export do; end + # show do; end + # edit do; end + # create do; end + # update do; end + # end + # config.model Services::Facebook do + # # Found associations: + # configure :user, :belongs_to_association + # configure :service_users, :has_many_association # # Found columns: + # configure :id, :integer + # configure :type, :string + # configure :user_id, :integer # Hidden + # configure :uid, :string + # configure :access_token, :string + # configure :access_secret, :string + # configure :nickname, :string + # configure :created_at, :datetime + # configure :updated_at, :datetime # # Sections: + # list do; end + # export do; end + # show do; end + # edit do; end + # create do; end + # update do; end + # end + # config.model Services::Tumblr do + # # Found associations: + # configure :user, :belongs_to_association + # configure :service_users, :has_many_association # # Found columns: + # configure :id, :integer + # configure :type, :string + # configure :user_id, :integer # Hidden + # configure :uid, :string + # configure :access_token, :string + # configure :access_secret, :string + # configure :nickname, :string + # configure :created_at, :datetime + # configure :updated_at, :datetime # # Sections: + # list do; end + # export do; end + # show do; end + # edit do; end + # create do; end + # update do; end + # end + # config.model Services::Twitter do + # # Found associations: + # configure :user, :belongs_to_association + # configure :service_users, :has_many_association # # Found columns: + # configure :id, :integer + # configure :type, :string + # configure :user_id, :integer # Hidden + # configure :uid, :string + # configure :access_token, :string + # configure :access_secret, :string + # configure :nickname, :string + # configure :created_at, :datetime + # configure :updated_at, :datetime # # Sections: + # list do; end + # export do; end + # show do; end + # edit do; end + # create do; end + # update do; end + # end + # config.model ShareVisibility do + # # Found associations: + # configure :shareable, :polymorphic_association + # configure :contact, :belongs_to_association # # Found columns: + # configure :id, :integer + # configure :shareable_id, :integer # Hidden + # configure :shareable_type, :string # Hidden + # configure :created_at, :datetime + # configure :updated_at, :datetime + # configure :hidden, :boolean + # configure :contact_id, :integer # Hidden # # Sections: + # list do; end + # export do; end + # show do; end + # edit do; end + # create do; end + # update do; end + # end + # config.model StatusMessage do + # # Found associations: + # configure :author, :belongs_to_association + # configure :reshares, :has_many_association + # configure :photos, :has_many_association + # configure :o_embed_cache, :belongs_to_association + # configure :likes, :has_many_association + # configure :dislikes, :has_many_association + # configure :comments, :has_many_association + # configure :aspect_visibilities, :has_many_association + # configure :aspects, :has_many_association + # configure :share_visibilities, :has_many_association + # configure :contacts, :has_many_association + # configure :participations, :has_many_association + # configure :mentions, :has_many_association + # configure :resharers, :has_many_association + # configure :taggings, :has_many_association # Hidden + # configure :base_tags, :has_many_association + # configure :tag_taggings, :has_many_association # Hidden + # configure :tags, :has_many_association # # Found columns: + # configure :id, :integer + # configure :author_id, :integer # Hidden + # configure :public, :boolean + # configure :diaspora_handle, :string + # configure :guid, :string + # configure :pending, :boolean + # configure :type, :string + # configure :text, :text + # configure :remote_photo_path, :text + # configure :remote_photo_name, :string + # configure :random_string, :string + # configure :processed_image, :string + # configure :created_at, :datetime + # configure :updated_at, :datetime + # configure :unprocessed_image, :string + # configure :object_url, :string + # configure :image_url, :string + # configure :image_height, :integer + # configure :image_width, :integer + # configure :provider_display_name, :string + # configure :actor_url, :string + # configure :objectId, :string + # configure :root_guid, :string # Hidden + # configure :status_message_guid, :string # Hidden + # configure :likes_count, :integer + # configure :comments_count, :integer + # configure :o_embed_cache_id, :integer # Hidden + # configure :reshares_count, :integer + # configure :interacted_at, :datetime # # Sections: + # list do; end + # export do; end + # show do; end + # edit do; end + # create do; end + # update do; end + # end + # config.model TagFollowing do + # # Found associations: + # configure :tag, :belongs_to_association + # configure :user, :belongs_to_association # # Found columns: + # configure :id, :integer + # configure :tag_id, :integer # Hidden + # configure :user_id, :integer # Hidden + # configure :created_at, :datetime + # configure :updated_at, :datetime # # Sections: + # list do; end + # export do; end + # show do; end + # edit do; end + # create do; end + # update do; end + # end + # config.model User do + # # Found associations: + # configure :invited_by, :belongs_to_association + # configure :auto_follow_back_aspect, :belongs_to_association + # configure :person, :has_one_association + # configure :invitations_from_me, :has_many_association + # configure :invitations_to_me, :has_many_association + # configure :aspects, :has_many_association + # configure :aspect_memberships, :has_many_association + # configure :contacts, :has_many_association + # configure :contact_people, :has_many_association + # configure :services, :has_many_association + # configure :user_preferences, :has_many_association + # configure :tag_followings, :has_many_association + # configure :followed_tags, :has_many_association + # configure :blocks, :has_many_association + # configure :ignored_people, :has_many_association + # configure :notifications, :has_many_association + # configure :authorizations, :has_many_association # Hidden + # configure :applications, :has_many_association # Hidden # # Found columns: + # configure :id, :integer + # configure :username, :string + # configure :serialized_private_key, :text + # configure :getting_started, :boolean + # configure :disable_mail, :boolean + # configure :language, :string + # configure :email, :string + # configure :password, :password # Hidden + # configure :password_confirmation, :password # Hidden + # configure :reset_password_token, :string # Hidden + # configure :remember_token, :string # Hidden + # configure :invitation_token, :string + # configure :invitation_sent_at, :datetime + # configure :remember_created_at, :datetime + # configure :sign_in_count, :integer + # configure :current_sign_in_at, :datetime + # configure :last_sign_in_at, :datetime + # configure :current_sign_in_ip, :string + # configure :last_sign_in_ip, :string + # configure :created_at, :datetime + # configure :updated_at, :datetime + # configure :invitation_service, :string + # configure :invitation_identifier, :string + # configure :invitation_limit, :integer + # configure :invited_by_id, :integer # Hidden + # configure :invited_by_type, :string + # configure :authentication_token, :string + # configure :unconfirmed_email, :string + # configure :confirm_email_token, :string + # configure :locked_at, :datetime + # configure :show_community_spotlight_in_stream, :boolean + # configure :auto_follow_back, :boolean + # configure :auto_follow_back_aspect_id, :integer # Hidden + # configure :hidden_shareables, :serialized # # Sections: + # list do; end + # export do; end + # show do; end + # edit do; end + # create do; end + # update do; end + # end + # config.model UserPreference do + # # Found associations: + # configure :user, :belongs_to_association # # Found columns: + # configure :id, :integer + # configure :email_type, :string + # configure :user_id, :integer # Hidden + # configure :created_at, :datetime + # configure :updated_at, :datetime # # Sections: + # list do; end + # export do; end + # show do; end + # edit do; end + # create do; end + # update do; end + # end +end +if defined?(WillPaginate) + module WillPaginate + module ActiveRecord + module RelationMethods + def per(value = nil) per_page(value) end + def total_count() count end + end + end + module CollectionMethods + alias_method :num_pages, :total_pages + end + end +end +end \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 40eaf7d150142eca060f27fe89d7a0075ee869a6..ad0e731ac188b82f031bce2ce1532a03f4017b40 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -3,6 +3,8 @@ # the COPYRIGHT file. Diaspora::Application.routes.draw do + mount RailsAdmin::Engine => '/admin_panel', :as => 'rails_admin' + get 'oembed' => 'posts#oembed', :as => 'oembed' # Posting and Reading resources :reshares