File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- _misc /
2- Gemfile.lock
1+ * .gem
32* .orig
43
4+ /.rspec_failures
5+ /.rubocop- *
6+ /Gemfile.lock
7+
8+ /_misc /
9+ /coverage /
10+ /spec /dummy /db /* .sqlite3 *
11+ /spec /dummy /log /
12+ /spec /dummy /storage /
13+ /spec /dummy /tmp /
Original file line number Diff line number Diff line change 1+ inherit_from :
2+ - https://relaxed.ruby.style/rubocop.yml
3+
4+ AllCops :
5+ Exclude :
6+ - bin/*
7+ - spec/dummy/**/*
8+ NewCops : enable
9+
10+ Gemspec/RequiredRubyVersion :
11+ Enabled : false
12+
13+ Naming/FileName :
14+ Enabled : false
15+
16+ Layout/LineLength :
17+ Enabled : true
18+ Max : 120
19+
20+ Style/HashEachMethods :
21+ Enabled : true
22+
23+ Style/HashTransformKeys :
24+ Enabled : true
25+
26+ Style/HashTransformValues :
27+ Enabled : true
Original file line number Diff line number Diff line change 1+ # frozen_string_literal: true
2+
13source 'https://rubygems.org'
24
35gemspec
Original file line number Diff line number Diff line change 1- require "bundler/gem_tasks"
1+ # frozen_string_literal: true
22
3+ require 'bundler/gem_tasks'
Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
3- lib = File . expand_path ( '../ lib' , __FILE__ )
3+ lib = File . expand_path ( 'lib' , __dir__ )
44$LOAD_PATH. unshift ( lib ) unless $LOAD_PATH. include? ( lib )
55require 'activeadmin_blaze_theme/version'
66
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env ruby
2+ # frozen_string_literal: true
3+
4+ #
5+ # This file was generated by Bundler.
6+ #
7+ # The application 'rails' is installed as part of a gem, and
8+ # this file is here to facilitate running it.
9+ #
10+
11+ require "pathname"
12+ ENV [ "BUNDLE_GEMFILE" ] ||= File . expand_path ( "../../Gemfile" ,
13+ Pathname . new ( __FILE__ ) . realpath )
14+
15+ bundle_binstub = File . expand_path ( "../bundle" , __FILE__ )
16+
17+ if File . file? ( bundle_binstub )
18+ if File . read ( bundle_binstub , 300 ) =~ /This file was generated by Bundler/
19+ load ( bundle_binstub )
20+ else
21+ abort ( "Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again." )
23+ end
24+ end
25+
26+ require "rubygems"
27+ require "bundler/setup"
28+
29+ load Gem . bin_path ( "railties" , "rails" )
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env ruby
2+ # frozen_string_literal: true
3+
4+ #
5+ # This file was generated by Bundler.
6+ #
7+ # The application 'rake' is installed as part of a gem, and
8+ # this file is here to facilitate running it.
9+ #
10+
11+ require "pathname"
12+ ENV [ "BUNDLE_GEMFILE" ] ||= File . expand_path ( "../../Gemfile" ,
13+ Pathname . new ( __FILE__ ) . realpath )
14+
15+ bundle_binstub = File . expand_path ( "../bundle" , __FILE__ )
16+
17+ if File . file? ( bundle_binstub )
18+ if File . read ( bundle_binstub , 300 ) =~ /This file was generated by Bundler/
19+ load ( bundle_binstub )
20+ else
21+ abort ( "Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again." )
23+ end
24+ end
25+
26+ require "rubygems"
27+ require "bundler/setup"
28+
29+ load Gem . bin_path ( "rake" , "rake" )
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env ruby
2+ # frozen_string_literal: true
3+
4+ #
5+ # This file was generated by Bundler.
6+ #
7+ # The application 'rspec' is installed as part of a gem, and
8+ # this file is here to facilitate running it.
9+ #
10+
11+ require "pathname"
12+ ENV [ "BUNDLE_GEMFILE" ] ||= File . expand_path ( "../../Gemfile" ,
13+ Pathname . new ( __FILE__ ) . realpath )
14+
15+ bundle_binstub = File . expand_path ( "../bundle" , __FILE__ )
16+
17+ if File . file? ( bundle_binstub )
18+ if File . read ( bundle_binstub , 300 ) =~ /This file was generated by Bundler/
19+ load ( bundle_binstub )
20+ else
21+ abort ( "Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again." )
23+ end
24+ end
25+
26+ require "rubygems"
27+ require "bundler/setup"
28+
29+ load Gem . bin_path ( "rspec-core" , "rspec" )
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env ruby
2+ # frozen_string_literal: true
3+
4+ #
5+ # This file was generated by Bundler.
6+ #
7+ # The application 'rubocop' is installed as part of a gem, and
8+ # this file is here to facilitate running it.
9+ #
10+
11+ require "pathname"
12+ ENV [ "BUNDLE_GEMFILE" ] ||= File . expand_path ( "../../Gemfile" ,
13+ Pathname . new ( __FILE__ ) . realpath )
14+
15+ bundle_binstub = File . expand_path ( "../bundle" , __FILE__ )
16+
17+ if File . file? ( bundle_binstub )
18+ if File . read ( bundle_binstub , 300 ) =~ /This file was generated by Bundler/
19+ load ( bundle_binstub )
20+ else
21+ abort ( "Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again." )
23+ end
24+ end
25+
26+ require "rubygems"
27+ require "bundler/setup"
28+
29+ load Gem . bin_path ( "rubocop" , "rubocop" )
Original file line number Diff line number Diff line change 1+ # frozen_string_literal: true
2+
13ActiveAdmin ::Views ::ActiveAdminForm . class_eval do
24 def accordion ( title , &block )
35 @accordion_id = @accordion_id ? ( @accordion_id + 1 ) : 1
@@ -15,16 +17,18 @@ def accordion_group( &block )
1517 end
1618
1719 def readonly ( field , value = nil , options = { } )
20+ field_value = value . nil? ? nil : raw ( value )
21+ field_value ||= ( field && object . respond_to? ( field ) ? object . send ( field ) : '' )
1822 cl = 'readonly-field'
19- cl += ' ' + options [ :class ] if options [ :class ]
23+ cl += " #{ options [ :class ] } " if options [ :class ]
2024 li class : cl do
2125 if !field . blank?
2226 label field , for : nil , class : 'field_label'
2327 else
2428 span ' ' . html_safe , class : 'field_label'
2529 end
2630 div do
27- span ( value . nil? ? ( field && object . respond_to? ( field ) ? object . send ( field ) : '' ) : raw ( value ) ) , class : 'field_value'
31+ span field_value , class : 'field_value'
2832 end
2933 end
3034 end
You can’t perform that action at this time.
0 commit comments