-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extract an administrate:manifest
generator
#362
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
end | ||
|
||
def create_resource_controller | ||
template( | ||
"controller.rb.erb", | ||
"app/controllers/admin/#{file_name.pluralize}_controller.rb", | ||
Rails.root.join("app/controllers/admin/#{file_name.pluralize}_controller.rb"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [88/80]
c-lliope
force-pushed
the
gw-manifest-generator
branch
from
January 8, 2016 06:03
60418f2
to
0441702
Compare
Problem: In established applications with many models, there is no easy way to generate Administrate dashboards for some but not all of the models. Solution: Add a generator for creating only an Administrate dashboard manifest. Users can edit the manifest file to add or remove models, and then run `rails g administrate:install` to generate only the dashboards listed in the manifest. If the user runs `rails g administrate:install` without first generating a manifest file, Administrate will automatically create a manifest and use it to guide the installation. Small Changes: - Stub out `Rails.root` in generators during tests. Using `Rails.root` lets us more accurately generate files when the Rails app is not at the root of the repository, such as in the example app.
c-lliope
force-pushed
the
gw-manifest-generator
branch
from
January 8, 2016 06:04
0441702
to
5f44461
Compare
c-lliope
added a commit
that referenced
this pull request
Jan 22, 2016
Changes: ``` * [#269] [FEATURE] Add a generator for copying default layout files * [#328] [FEATURE] Add a generator for copying default sidebar partial * [#362] [FEATURE] Add a generator for only the dashboard manifest. Customizing this manifest before running the `administrate:install` generator will change which dashboards get generated. * [#295] [FEATURE] Add dashboard detection for ActiveRecord::Enum fields. * [#364] [FEATURE] Improve dashboard generator by explicitly listing out the generated `SHOW_PAGE_ATTRIBUTES` array elements. * [#416] [UI] Add an accessibility label to the search input * [#411] [UI] Use tabular figures in table cells * [#409] [UI] Use default system fonts * [#424] [BUGFIX] Fix a bug where running `rails destroy GENERATOR_NAME` would not work for several of the generators * [#390] [BUGFIX] Fix timestamp deprecation warnings * [#365] [COMPAT] Remove dependency on `inline_svg` * [#396] [I18n] Ukrainian * [#297] [I18n] Italian * [#307] [I18n] Fix German grammatical errors * [#363] [DOC] Move documentation into main repository, at the root URL * [#395] [DOC] Update inline documentation for collection partial * [#387] [DOC] Fix incorrect path for generators in the docs ```
Merged
c-lliope
added a commit
that referenced
this pull request
Jan 22, 2016
Changes: ``` * [#269] [FEATURE] Add a generator for copying default layout files * [#328] [FEATURE] Add a generator for copying default sidebar partial * [#362] [FEATURE] Add a generator for only the dashboard manifest. Customizing this manifest before running the `administrate:install` generator will change which dashboards get generated. * [#295] [FEATURE] Add dashboard detection for ActiveRecord::Enum fields. * [#364] [FEATURE] Improve dashboard generator by explicitly listing out the generated `SHOW_PAGE_ATTRIBUTES` array elements. * [#416] [UI] Add an accessibility label to the search input * [#411] [UI] Use tabular figures in table cells * [#409] [UI] Use default system fonts * [#424] [BUGFIX] Fix a bug where running `rails destroy GENERATOR_NAME` would not work for several of the generators * [#390] [BUGFIX] Fix timestamp deprecation warnings * [#365] [COMPAT] Remove dependency on `inline_svg` * [#396] [I18n] Ukrainian * [#297] [I18n] Italian * [#307] [I18n] Fix German grammatical errors * [#363] [DOC] Move documentation into main repository, at the root URL * [#395] [DOC] Update inline documentation for collection partial * [#387] [DOC] Fix incorrect path for generators in the docs ```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #182.
Problem:
In established applications with many models,
there is no easy way to generate Administrate dashboards
for some but not all of the models.
Solution:
Add a generator for creating only an Administrate dashboard manifest.
Users can edit the manifest file to add or remove models,
and then run
rails g administrate:install
to generate only the dashboards listed in the manifest.
If the user runs
rails g administrate:install
without first generating a manifest file,
Administrate will automatically create a manifest
and use it to guide the installation.
Small Changes:
Stub out
Rails.root
in generators during tests.Using
Rails.root
lets us more accurately generate fileswhen the Rails app is not at the root of the repository,
such as in the example app.