source
stringclasses
1 value
repo
stringlengths
5
63
repo_url
stringlengths
24
82
path
stringlengths
5
167
language
stringclasses
1 value
license
stringclasses
5 values
stars
int64
10
51.4k
ref
stringclasses
23 values
size_bytes
int64
200
258k
text
stringlengths
137
258k
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/authorization/pundit_spec.rb
Ruby
mit
7,954
master
5,601
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'RailsAdmin Pundit Authorization', type: :request do subject { page } before do RailsAdmin.config do |c| c.authorize_with(:pundit) c.authenticate_with { warden.authenticate! scope: :user } c.current_user_method(&:current_use...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/auditing/paper_trail_spec.rb
Ruby
mit
7,954
master
6,951
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'RailsAdmin PaperTrail auditing', active_record: true do before(:each) do RailsAdmin.config do |config| config.audit_with :paper_trail end end shared_examples :paper_on_object_creation do describe 'on object creation', type: :...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/widgets/nested_many_spec.rb
Ruby
mit
7,954
master
6,886
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'Nested many widget', type: :request, js: true do subject { page } let(:field_test) { FactoryBot.create :field_test } let(:nested_field_tests) { %w[1 2].map { |i| NestedFieldTest.create! title: "title #{i}", field_test: field_test } } before ...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/widgets/nested_one_spec.rb
Ruby
mit
7,954
master
4,028
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'Nested one widget', type: :request, js: true do subject { page } let(:field_test) { FactoryBot.create :field_test } before do RailsAdmin.config(FieldTest) do field :comment end end it 'adds an nested item' do visit edit_...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/widgets/filtering_multi_select_spec.rb
Ruby
mit
7,954
master
7,349
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'Filtering multi-select widget', type: :request, js: true do subject { page } let(:team) { FactoryBot.create :team } let!(:players) { ['Cory Burns', 'Leonys Martin', 'Matt Garza'].map { |name| FactoryBot.create :player, name: name } } before ...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/widgets/filtering_select_spec.rb
Ruby
mit
7,954
master
8,799
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'Filtering select widget', type: :request, js: true do subject { page } let!(:teams) { ['Los Angeles Dodgers', 'Texas Rangers'].map { |name| FactoryBot.create :team, name: name } } let(:player) { FactoryBot.create :player, team: teams[0] } be...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/widgets/datetimepicker_spec.rb
Ruby
mit
7,954
master
3,238
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'Datetimepicker widget', type: :request, js: true do subject { page } before do RailsAdmin.config FieldTest do edit do field :datetime_field end end end it 'is initially blank' do visit new_path(model_name: 'f...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/widgets/remote_form_spec.rb
Ruby
mit
7,954
master
6,671
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'Remote form widget', type: :request, js: true do subject { page } describe 'modal' do it 'supports focusing on sub-modals' do visit new_path(model_name: 'division') click_link 'Add a new League' is_expected.to have_content ...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/widgets/filter_box_spec.rb
Ruby
mit
7,954
master
6,888
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'Filter box widget', type: :request, js: true do subject { page } it 'adds filters' do RailsAdmin.config Player do field :name field :position end visit index_path(model_name: 'player') is_expected.to have_no_css('#fil...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/actions/export_spec.rb
Ruby
mit
7,954
master
6,907
# frozen_string_literal: true require 'spec_helper' require 'csv' RSpec.describe 'Export action', type: :request do subject { page } let!(:player) { FactoryBot.create(:player) } it 'exports to CSV' do visit export_path(model_name: 'player') click_button 'Export to csv' is_expected.to have_content ...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/actions/base_spec.rb
Ruby
mit
7,954
master
2,004
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'Base action', type: :request do subject { page } describe '#enabled?' do it 'prevents the access to unauthorized actions' do RailsAdmin.config do |config| config.actions do index do except %w[FieldTest] ...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/actions/show_in_app_spec.rb
Ruby
mit
7,954
master
499
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'ShowInApp action', type: :request do subject { page } describe 'link' do let!(:player) { FactoryBot.create :player } it 'has the data-turbo: false attribute' do visit index_path(model_name: 'player') is_expected.to have_sele...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/actions/history_index_spec.rb
Ruby
mit
7,954
master
1,595
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'HistoryIndex action', type: :request, active_record: true do subject { page } let(:user) { FactoryBot.create :user } let(:paper_trail_test) { FactoryBot.create :paper_trail_test } before(:each) do RailsAdmin.config do |config| conf...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/actions/history_show_spec.rb
Ruby
mit
7,954
master
1,322
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'HistoryShow action', type: :request, active_record: true do let(:user) { FactoryBot.create :user } let(:paper_trail_test) { FactoryBot.create :paper_trail_test } before(:each) do RailsAdmin.config do |config| config.audit_with :paper_...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/actions/show_spec.rb
Ruby
mit
7,954
master
12,824
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'Show action', type: :request do subject { page } let(:team) { FactoryBot.create :team } describe 'page' do it 'has History, Edit, Delete, Details and attributes' do @player = FactoryBot.create :player visit show_path(model_name...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/actions/dashboard_spec.rb
Ruby
mit
7,954
master
3,414
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'Dashboard action', type: :request do subject { page } it 'shows statistics by default' do allow(RailsAdmin.config(Player).abstract_model).to receive(:count).and_return(0) expect(RailsAdmin.config(Player).abstract_model).to receive(:count...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/actions/new_spec.rb
Ruby
mit
7,954
master
7,244
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'New action', type: :request do subject { page } describe 'page' do before do visit new_path(model_name: 'player') end it 'shows "New Model"' do is_expected.to have_content('New Player') end it 'shows required fi...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/actions/delete_spec.rb
Ruby
mit
7,954
master
5,938
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'Delete action', type: :request do subject { page } it 'shows "Delete model"' do @draft = FactoryBot.create :draft @player = @draft.player @comment = @player.comments.create visit delete_path(model_name: 'player', id: @player.id) ...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/actions/edit_spec.rb
Ruby
mit
7,954
master
30,829
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'Edit action', type: :request do subject { page } describe 'page' do before do @player = FactoryBot.create :player visit edit_path(model_name: 'player', id: @player.id) end it 'shows "Edit model"' do is_expected.to ...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/actions/index_spec.rb
Ruby
mit
7,954
master
41,621
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'Index action', type: :request do subject { page } describe 'page' do it 'shows "List of Models", should show filters and should show column headers' do RailsAdmin.config.default_items_per_page = 1 2.times { FactoryBot.create :pla...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/actions/bulk_delete_spec.rb
Ruby
mit
7,954
master
4,297
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'BulkDelete action', type: :request do subject { page } describe 'confirmation page' do before do @players = FactoryBot.create_list(:player, 2) end it 'shows names of to-be-deleted players' do post(bulk_action_path(bulk_a...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/fields/action_text_spec.rb
Ruby
mit
7,954
master
1,412
# frozen_string_literal: true require 'spec_helper' if defined?(ActionText) RSpec.describe 'ActionText field', type: :request, js: true do subject { page } before do RailsAdmin.config FieldTest do edit do field :action_text_field end end end it 'works without ...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/fields/boolean_spec.rb
Ruby
mit
7,954
master
3,836
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'Boolean field', type: :request do subject { page } let(:field_test) { FactoryBot.create :field_test } context 'if nullable' do before do RailsAdmin.config FieldTest do field :boolean_field end end it 'shows 3 r...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/fields/multiple_file_upload_spec.rb
Ruby
mit
7,954
master
1,181
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'MultipleFileUpload field', type: :request do subject { page } before do RailsAdmin.config FieldTest do field :string_field, :multiple_file_upload do attachment do delete_value { value } def resource_url(_thu...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/fields/paperclip_spec.rb
Ruby
mit
7,954
master
349
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'Paperclip field', type: :request do subject { page } it 'shows a file upload field' do RailsAdmin.config User do edit do field :avatar end end visit new_path(model_name: 'user') is_expected.to have_selector('i...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/fields/has_and_belongs_to_many_association_spec.rb
Ruby
mit
7,954
master
2,828
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'HasAndBelongsToManyAssociation field', type: :request do subject { page } context 'on create' do before do @teams = FactoryBot.create_list(:team, 3) post new_path(model_name: 'fan', fan: {name: 'John Doe', team_ids: [@teams[0].id...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/fields/time_spec.rb
Ruby
mit
7,954
master
3,917
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'Time field', type: :request, active_record: true do subject { page } before do RailsAdmin.config FieldTest do edit do field :time_field end end end describe 'filtering' do let!(:field_tests) do [FactoryB...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/fields/multiple_active_storage_spec.rb
Ruby
mit
7,954
master
2,888
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'MultipleActiveStorage field', type: :request, active_record: true do subject { page } before do RailsAdmin.config FieldTest do edit do field :active_storage_assets end end # To suppress 'SQLite3::BusyException: dat...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/fields/carrierwave_spec.rb
Ruby
mit
7,954
master
733
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'Carrierwave field', type: :request, active_record: true do subject { page } before do RailsAdmin.config FieldTest do edit do field :string_field field :carrierwave_asset end end end it 'supports caching an...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/fields/datetime_spec.rb
Ruby
mit
7,954
master
3,689
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'Datetime field', type: :request do subject { page } before do RailsAdmin.config FieldTest do edit do field :datetime_field end end end describe 'filtering' do let!(:field_tests) do [FactoryBot.create(:fi...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/fields/base_spec.rb
Ruby
mit
7,954
master
3,038
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'Base field', type: :request do subject { page } describe '#default_value' do it 'is set for all types of input fields' do RailsAdmin.config do |config| config.excluded_models = [] config.model(FieldTest) do fi...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/fields/polymorphic_assosiation_spec.rb
Ruby
mit
7,954
master
7,046
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'PolymorphicAssociation field', type: :request do subject { page } context 'on create' do it 'is editable', js: true do @players = ['Jackie Robinson', 'Rob Wooten'].map { |name| FactoryBot.create :player, name: name } visit new_pa...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/fields/enum_spec.rb
Ruby
mit
7,954
master
1,544
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'Enum field', type: :request, active_record: true do subject { page } before do allow_any_instance_of(Team).to receive(:color_enum).and_return(%w[blue green red]) end describe 'for single value' do before do RailsAdmin.config T...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/fields/code_mirror_spec.rb
Ruby
mit
7,954
master
393
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'CodeMirror field', type: :request do subject { page } it 'works without error', js: true do RailsAdmin.config Draft do edit do field :notes, :code_mirror end end expect { visit new_path(model_name: 'draft') }.not_...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/fields/has_one_association_spec.rb
Ruby
mit
7,954
master
6,480
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'HasOneAssociation field', type: :request do subject { page } it 'adds a related id to the has_one create draft link' do @player = FactoryBot.create :player visit edit_path(model_name: 'player', id: @player.id) is_expected.to have_sel...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/fields/ck_editor_spec.rb
Ruby
mit
7,954
master
394
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'CKEditor field', type: :request do subject { page } it 'works without error', js: true do RailsAdmin.config Draft do edit do field :notes, :ck_editor end end expect { visit new_path(model_name: 'draft') }.not_to r...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/fields/simple_mde_spec.rb
Ruby
mit
7,954
master
405
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'SimpleMDE field', type: :request do subject { page } it 'works without error', js: true do RailsAdmin.config Draft do edit do field :notes, :simple_mde end end expect { visit new_path(model_name: 'draft') }.not_to...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/fields/active_storage_spec.rb
Ruby
mit
7,954
master
1,274
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'ActiveStorage field', type: :request, active_record: true do subject { page } let(:field_test) { FactoryBot.create :field_test } before do # To suppress 'SQLite3::BusyException: database is locked' exception @original = page.driver.brow...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/fields/floara_spec.rb
Ruby
mit
7,954
master
808
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'Floara field', type: :request do subject { page } it 'works without error', js: true do RailsAdmin.config Draft do edit do field :notes, :froala end end expect { visit new_path(model_name: 'draft') }.not_to raise_...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/fields/multiple_carrierwave_spec.rb
Ruby
mit
7,954
master
2,408
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'MultipleCarrierwave field', type: :request, active_record: true do subject { page } before do RailsAdmin.config FieldTest do edit do field :carrierwave_assets end end end it 'supports uploading multiple files', js...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/fields/hidden_spec.rb
Ruby
mit
7,954
master
1,634
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'Hidden field', type: :request do subject { page } describe '#default_value' do before do RailsAdmin::Config.authenticate_with { warden.authenticate! scope: :user } RailsAdmin::Config.current_user_method(&:current_user) logi...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/fields/color_spec.rb
Ruby
mit
7,954
master
332
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'Color field', type: :request do subject { page } it 'uses HTML5 color picker' do RailsAdmin.config Team do field :color, :color end visit new_path(model_name: 'team') is_expected.to have_selector('#team_color[type="color"]'...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/fields/belongs_to_association_spec.rb
Ruby
mit
7,954
master
5,583
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'BelongsToAssociation field', type: :request do subject { page } it 'does not add a related id to the belongs_to create team link' do @player = FactoryBot.create :player visit edit_path(model_name: 'player', id: @player.id) is_expecte...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/fields/wysihtml5_spec.rb
Ruby
mit
7,954
master
831
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'Wysihtml5 field', type: :request do subject { page } it 'works without error', js: true do RailsAdmin.config Draft do edit do field :notes, :wysihtml5 end end expect { visit new_path(model_name: 'draft') }.not_to ...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/fields/date_spec.rb
Ruby
mit
7,954
master
3,490
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'Date field', type: :request do subject { page } before do RailsAdmin.config FieldTest do field :id field :date_field end end describe 'filtering' do let!(:field_tests) do [FactoryBot.create(:field_test, date_fie...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/fields/serialized_spec.rb
Ruby
mit
7,954
master
1,557
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'Serialized field', type: :request do subject { page } context 'with serialized objects' do before do RailsAdmin.config do |c| c.model User do configure :roles, :serialized end end @user = FactoryB...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/fields/has_many_association_spec.rb
Ruby
mit
7,954
master
10,364
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'HasManyAssociation field', type: :request do subject { page } it 'adds a related id to the has_many create team link' do @team = FactoryBot.create :team visit edit_path(model_name: 'team', id: @team.id) is_expected.to have_selector("...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/fields/active_record_enum_spec.rb
Ruby
mit
7,954
master
2,423
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'ActiveRecordEnum field', type: :request, active_record: true do subject { page } describe 'for string-keyed enum' do before do RailsAdmin.config FieldTest do edit do field :string_enum_field do default_val...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/fields/shrine_spec.rb
Ruby
mit
7,954
master
718
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'Shrine field', type: :request, active_record: true do subject { page } before do RailsAdmin.config FieldTest do edit do field :string_field field :shrine_asset end end end it 'supports caching an uploaded ...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/fields/file_upload_spec.rb
Ruby
mit
7,954
master
982
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'FileUpload field', type: :request do subject { page } before do RailsAdmin.config FieldTest do field :string_field, :file_upload do delete_method 'boolean_field' def resource_url(_thumb = false) value ...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/integration/authentication/devise_spec.rb
Ruby
mit
7,954
master
765
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'RailsAdmin Devise Authentication', type: :request do subject { page } let!(:user) { FactoryBot.create :user } before do RailsAdmin.config do |config| config.authenticate_with do warden.authenticate! scope: :user end ...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/controllers/rails_admin/application_controller_spec.rb
Ruby
mit
7,954
master
1,360
# frozen_string_literal: true require 'spec_helper' RSpec.describe RailsAdmin::ApplicationController, type: :controller do describe '#to_model_name' do it 'works with modules' do expect(controller.to_model_name('conversations~conversation')).to eq('Conversations::Conversation') end end describe '...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/controllers/rails_admin/main_controller_spec.rb
Ruby
mit
7,954
master
20,425
# frozen_string_literal: true require 'spec_helper' RSpec.describe RailsAdmin::MainController, type: :controller do routes { RailsAdmin::Engine.routes } def get(action, params) super action, params: params end before do controller.instance_variable_set :@action, RailsAdmin::Config::Actions.find(:ind...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/helpers/rails_admin/main_helper_spec.rb
Ruby
mit
7,954
master
1,440
# frozen_string_literal: true require 'spec_helper' RSpec.describe RailsAdmin::MainHelper, type: :helper do describe '#rails_admin_form_for' do let(:html_form) do helper.rails_admin_form_for(FieldTest.new, url: new_path(model_name: 'field_test')) {} end let(:html_form_with_attrs) do helper....
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/helpers/rails_admin/form_builder_spec.rb
Ruby
mit
7,954
master
1,951
# frozen_string_literal: true require 'spec_helper' RSpec.describe 'RailsAdmin::FormBuilder', type: :helper do describe '#generate' do before do RailsAdmin.config Player do create do include_all_fields field :number, :hidden end end allow(helper).to receive(...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/helpers/rails_admin/application_helper_spec.rb
Ruby
mit
7,954
master
18,367
# frozen_string_literal: true require 'spec_helper' RSpec.describe RailsAdmin::ApplicationHelper, type: :helper do describe '#authorized?' do let(:abstract_model) { RailsAdmin.config(FieldTest).abstract_model } it 'doesn\'t use unpersisted objects' do expect(helper).to receive(:action).with(:edit, ab...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/support/fakeio.rb
Ruby
mit
7,954
master
377
# frozen_string_literal: true require 'forwardable' require 'stringio' class FakeIO attr_reader :original_filename, :content_type def initialize(content, filename: nil, content_type: nil) @io = StringIO.new(content) @original_filename = filename @content_type = content_type end extend Forwardabl...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/dummy_app/Gemfile
Ruby
mit
7,954
master
1,305
# frozen_string_literal: true source 'https://rubygems.org' gem 'rails', '>= 7.0.0' group :active_record do platforms :jruby do gem 'activerecord-jdbcmysql-adapter', '>= 1.2' if ENV['CI_DB_ADAPTER'] == 'mysql2' gem 'activerecord-jdbcpostgresql-adapter', '>= 1.2' if ENV['CI_DB_ADAPTER'] == 'postgresql' ...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/dummy_app/Rakefile
Ruby
mit
7,954
master
280
# frozen_string_literal: true # Add your own tasks in files placed in lib/tasks ending in .rake, # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. require File.expand_path('config/application', __dir__) DummyApp::Application.load_tasks
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/dummy_app/lib/does_not_load_autoload_paths_not_in_eager_load.rb
Ruby
mit
7,954
master
213
# frozen_string_literal: true module DoesNotLoadAutoloadPathsNotInEagerLoad raise 'This file is in app.paths.autoload but not app.paths.eager_load and ' \ ' should not be autoloaded by rails_admin' end
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/dummy_app/db/schema.rb
Ruby
mit
7,954
master
10,845
# This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. # # This file is the source Rails uses to define your schema when running `bin/rai...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/dummy_app/db/seeds.rb
Ruby
mit
7,954
master
1,534
# frozen_string_literal: true require 'mlb' user_model = RailsAdmin::AbstractModel.new(User) league_model = RailsAdmin::AbstractModel.new(League) division_model = RailsAdmin::AbstractModel.new(Division) team_model = RailsAdmin::AbstractModel.new(Team) player_model = RailsAdmin::AbstractModel.new(Player) ...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/dummy_app/db/migrate/00000000000002_create_drafts_migration.rb
Ruby
mit
7,954
master
428
# frozen_string_literal: true class CreateDraftsMigration < ActiveRecord::Migration[5.0] def self.up create_table :drafts do |t| t.timestamps null: false t.integer :player_id t.integer :team_id t.date :date t.integer :round t.integer :pick t.integer :overall t.stri...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/dummy_app/db/migrate/20120720075608_create_another_field_tests.rb
Ruby
mit
7,954
master
268
# frozen_string_literal: true class CreateAnotherFieldTests < ActiveRecord::Migration[5.0] def change create_table :another_field_tests do |t| t.timestamps null: false end add_column :nested_field_tests, :another_field_test_id, :integer end end
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/dummy_app/db/migrate/00000000000007_create_histories_table.rb
Ruby
mit
7,954
master
399
# frozen_string_literal: true class CreateHistoriesTable < ActiveRecord::Migration[5.0] def self.up create_table :histories do |t| t.string :message # title, name, or object_id t.string :username t.integer :item t.string :table t.timestamps null: false end add_index(:histori...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/dummy_app/db/migrate/20110328193014_create_cms_basic_pages.rb
Ruby
mit
7,954
master
292
# frozen_string_literal: true class CreateCmsBasicPages < ActiveRecord::Migration[5.0] def self.up create_table :cms_basic_pages do |t| t.string :title t.text :content t.timestamps null: false end end def self.down drop_table :cms_basic_pages end end
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/dummy_app/db/migrate/20240921171953_add_non_nullable_boolean_field.rb
Ruby
mit
7,954
master
214
# frozen_string_literal: true class AddNonNullableBooleanField < ActiveRecord::Migration[6.0] def change add_column :field_tests, :non_nullable_boolean_field, :boolean, null: false, default: false end end
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/dummy_app/db/migrate/20140412075608_create_deeply_nested_field_tests.rb
Ruby
mit
7,954
master
270
# frozen_string_literal: true class CreateDeeplyNestedFieldTests < ActiveRecord::Migration[5.0] def change create_table :deeply_nested_field_tests do |t| t.belongs_to :nested_field_test t.string :title t.timestamps null: false end end end
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/dummy_app/db/migrate/00000000000008_create_fans_migration.rb
Ruby
mit
7,954
master
271
# frozen_string_literal: true class CreateFansMigration < ActiveRecord::Migration[5.0] def self.up create_table :fans do |t| t.timestamps null: false t.string :name, limit: 100, null: false end end def self.down drop_table :fans end end
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/dummy_app/db/migrate/20140826093552_create_versions.rb
Ruby
mit
7,954
master
383
# frozen_string_literal: true class CreateVersions < ActiveRecord::Migration[5.0] def change create_table :versions do |t| t.string :item_type, null: false t.integer :item_id, null: false t.string :event, null: false t.string :whodunnit t.text :object t.datetime :created_at ...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/dummy_app/db/migrate/20201127111952_update_active_storage_tables.rb
Ruby
mit
7,954
master
486
# frozen_string_literal: true class UpdateActiveStorageTables < ActiveRecord::Migration[5.0] def change add_column :active_storage_blobs, :service_name, :string, null: false, default: 'local' create_table :active_storage_variant_records do |t| t.belongs_to :blob, null: false, index: false t.strin...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/dummy_app/db/migrate/00000000000012_add_avatar_columns_to_user.rb
Ruby
mit
7,954
master
533
# frozen_string_literal: true class AddAvatarColumnsToUser < ActiveRecord::Migration[5.0] def self.up add_column :users, :avatar_file_name, :string add_column :users, :avatar_content_type, :string add_column :users, :avatar_file_size, :integer add_column :users, :avatar_updated_at, :datetime ...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/dummy_app/db/migrate/20111108143642_add_dragonfly_and_carrierwave_to_field_tests.rb
Ruby
mit
7,954
master
311
# frozen_string_literal: true class AddDragonflyAndCarrierwaveToFieldTests < ActiveRecord::Migration[5.0] def change add_column :field_tests, :paperclip_asset_file_name, :string add_column :field_tests, :dragonfly_asset_uid, :string add_column :field_tests, :carrierwave_asset, :string end end
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/dummy_app/db/migrate/20210812115908_create_custom_versions.rb
Ruby
mit
7,954
master
403
# frozen_string_literal: true class CreateCustomVersions < ActiveRecord::Migration[5.0] def change create_table :custom_versions do |t| t.string :item_type, null: false t.integer :item_id, null: false t.string :event, null: false t.string :whodunnit t.text :object t.datetime :...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/dummy_app/db/migrate/20180707101855_add_carrierwave_assets_to_field_tests.rb
Ruby
mit
7,954
master
209
# frozen_string_literal: true class AddCarrierwaveAssetsToFieldTests < ActiveRecord::Migration[5.0] def change add_column :field_tests, :carrierwave_assets, :string, after: :carrierwave_asset end end
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/dummy_app/db/migrate/00000000000006_devise_create_users.rb
Ruby
mit
7,954
master
1,390
# frozen_string_literal: true class DeviseCreateUsers < ActiveRecord::Migration[5.0] def self.up create_table :users do |t| ## Database authenticatable t.string :email, null: false, default: '' t.string :encrypted_password, null: false, default: '' ## Recoverable t.str...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/dummy_app/db/migrate/00000000000003_create_leagues_migration.rb
Ruby
mit
7,954
master
279
# frozen_string_literal: true class CreateLeaguesMigration < ActiveRecord::Migration[5.0] def self.up create_table :leagues do |t| t.timestamps null: false t.string :name, limit: 50, null: false end end def self.down drop_table :leagues end end
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/dummy_app/db/migrate/20110224184303_create_field_tests.rb
Ruby
mit
7,954
master
529
# frozen_string_literal: true class CreateFieldTests < ActiveRecord::Migration[5.0] def self.up create_table :field_tests do |t| t.string :string_field t.text :text_field t.integer :integer_field t.float :float_field t.decimal :decimal_field t.datetime :datetime_field t....
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/dummy_app/db/migrate/00000000000011_add_suspended_to_player_migration.rb
Ruby
mit
7,954
master
246
# frozen_string_literal: true class AddSuspendedToPlayerMigration < ActiveRecord::Migration[5.0] def self.up add_column :players, :suspended, :boolean, default: false end def self.down remove_column :players, :suspended end end
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/dummy_app/db/migrate/20110831090841_add_protected_field_and_restricted_field_to_field_tests.rb
Ruby
mit
7,954
master
250
# frozen_string_literal: true class AddProtectedFieldAndRestrictedFieldToFieldTests < ActiveRecord::Migration[5.0] def change add_column :field_tests, :restricted_field, :string add_column :field_tests, :protected_field, :string end end
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/dummy_app/db/migrate/20110901154834_change_length_for_rails_admin_histories.rb
Ruby
mit
7,954
master
258
# frozen_string_literal: true class ChangeLengthForRailsAdminHistories < ActiveRecord::Migration[5.0] def up change_column :rails_admin_histories, :message, :text end def down change_column :rails_admin_histories, :message, :string end end
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/dummy_app/db/migrate/00000000000004_create_players_migration.rb
Ruby
mit
7,954
master
531
# frozen_string_literal: true class CreatePlayersMigration < ActiveRecord::Migration[5.0] def self.up create_table :players do |t| t.timestamps null: false t.datetime :deleted_at t.integer :team_id t.string :name, limit: 100, null: false t.string :position, limit: 50 t.integer...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/dummy_app/db/migrate/20110103205808_create_comments.rb
Ruby
mit
7,954
master
316
# frozen_string_literal: true class CreateComments < ActiveRecord::Migration[5.0] def self.up create_table :comments do |t| t.integer :commentable_id t.string :commentable_type t.text :content t.timestamps null: false end end def self.down drop_table :comments end end
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/dummy_app/db/migrate/20110714095433_create_balls.rb
Ruby
mit
7,954
master
254
# frozen_string_literal: true class CreateBalls < ActiveRecord::Migration[5.0] def self.up create_table :balls, force: true do |t| t.string :color t.timestamps null: false end end def self.down drop_table :balls end end
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/dummy_app/db/migrate/20151027181550_change_field_test_id_to_nested_field_tests.rb
Ruby
mit
7,954
master
204
# frozen_string_literal: true class ChangeFieldTestIdToNestedFieldTests < ActiveRecord::Migration[5.0] def change change_column :nested_field_tests, :field_test_id, :integer, null: false end end
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/dummy_app/db/migrate/20101223222233_create_rel_tests.rb
Ruby
mit
7,954
master
327
# frozen_string_literal: true class CreateRelTests < ActiveRecord::Migration[5.0] def self.up create_table :rel_tests do |t| t.integer :league_id t.integer :division_id, null: false t.integer :player_id t.timestamps null: false end end def self.down drop_table :rel_tests e...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/dummy_app/db/migrate/20120928075608_create_images.rb
Ruby
mit
7,954
master
305
# frozen_string_literal: true class CreateImages < ActiveRecord::Migration[5.0] def change create_table :images do |t| t.string :file_file_name t.string :file_content_type t.bigint :file_file_size t.datetime :file_updated_at t.timestamps null: false end end end
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/dummy_app/db/migrate/00000000000001_create_divisions_migration.rb
Ruby
mit
7,954
master
313
# frozen_string_literal: true class CreateDivisionsMigration < ActiveRecord::Migration[5.0] def self.up create_table :divisions do |t| t.timestamps null: false t.integer :league_id t.string :name, limit: 50, null: false end end def self.down drop_table(:divisions) end end
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/dummy_app/db/migrate/20150815102450_add_refile_to_field_tests.rb
Ruby
mit
7,954
master
351
# frozen_string_literal: true class AddRefileToFieldTests < ActiveRecord::Migration[5.0] def change add_column :field_tests, :refile_asset_id, :string add_column :field_tests, :refile_asset_filename, :string add_column :field_tests, :refile_asset_size, :string add_column :field_tests, :refile_asset_c...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/dummy_app/db/migrate/00000000000005_create_teams_migration.rb
Ruby
mit
7,954
master
575
# frozen_string_literal: true class CreateTeamsMigration < ActiveRecord::Migration[5.0] def self.up create_table :teams do |t| t.timestamps null: false t.integer :league_id t.integer :division_id t.string :name, limit: 50 t.string :logo_url, limit: 255 t.string :manager, limit...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/dummy_app/db/migrate/00000000000010_add_revenue_to_team_migration.rb
Ruby
mit
7,954
master
243
# frozen_string_literal: true class AddRevenueToTeamMigration < ActiveRecord::Migration[5.0] def self.up add_column :teams, :revenue, :decimal, precision: 18, scale: 2 end def self.down remove_column :teams, :revenue end end
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/dummy_app/db/migrate/20110123042530_rename_histories_to_rails_admin_histories.rb
Ruby
mit
7,954
master
256
# frozen_string_literal: true class RenameHistoriesToRailsAdminHistories < ActiveRecord::Migration[5.0] def self.up rename_table :histories, :rails_admin_histories end def self.down rename_table :rails_admin_histories, :histories end end
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/dummy_app/db/migrate/20210811121027_create_two_level_namespaced_polymorphic_association_tests.rb
Ruby
mit
7,954
master
268
# frozen_string_literal: true class CreateTwoLevelNamespacedPolymorphicAssociationTests < ActiveRecord::Migration[5.0] def change create_table :two_level_namespaced_polymorphic_association_tests do |t| t.string :name t.timestamps end end end
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/dummy_app/db/migrate/20180701084251_create_active_storage_tables.active_storage.rb
Ruby
mit
7,954
master
1,028
# frozen_string_literal: true # This migration comes from active_storage (originally 20170806125915) class CreateActiveStorageTables < ActiveRecord::Migration[5.0] def change create_table :active_storage_blobs do |t| t.string :key, null: false t.string :filename, null: false t.stri...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/dummy_app/db/migrate/20110329183136_remove_league_id_from_teams.rb
Ruby
mit
7,954
master
220
# frozen_string_literal: true class RemoveLeagueIdFromTeams < ActiveRecord::Migration[5.0] def self.up remove_column :teams, :league_id end def self.down add_column :teams, :league_id, :integer end end
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/dummy_app/db/migrate/20140826093220_create_paper_trail_tests.rb
Ruby
mit
7,954
master
217
# frozen_string_literal: true class CreatePaperTrailTests < ActiveRecord::Migration[5.0] def change create_table :paper_trail_tests do |t| t.string :name t.timestamps null: false end end end
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/dummy_app/db/migrate/20120319041705_drop_rel_tests.rb
Ruby
mit
7,954
master
325
# frozen_string_literal: true class DropRelTests < ActiveRecord::Migration[5.0] def self.up drop_table :rel_tests end def self.down create_table :rel_tests do |t| t.integer :league_id t.integer :division_id, null: false t.integer :player_id t.timestamps null: false end end...
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/dummy_app/db/migrate/20111215083258_create_foo_bars.rb
Ruby
mit
7,954
master
200
# frozen_string_literal: true class CreateFooBars < ActiveRecord::Migration[5.0] def change create_table :foo_bars do |t| t.string :title t.timestamps null: false end end end
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/dummy_app/db/migrate/20111123092549_create_nested_field_tests.rb
Ruby
mit
7,954
master
251
# frozen_string_literal: true class CreateNestedFieldTests < ActiveRecord::Migration[5.0] def change create_table :nested_field_tests do |t| t.string :title t.integer :field_test_id t.timestamps null: false end end end
github
railsadminteam/rails_admin
https://github.com/railsadminteam/rails_admin
spec/dummy_app/db/migrate/00000000000013_add_roles_to_user.rb
Ruby
mit
7,954
master
202
# frozen_string_literal: true class AddRolesToUser < ActiveRecord::Migration[5.0] def self.up add_column :users, :roles, :string end def self.down remove_column :users, :roles end end