Releases: hot-glue-for-rails/hot-glue
v0.6.10 - passdown fixes, adds `--no-nav-menu` option; other fixes
- adds
--no-nav-menu
option to supress writing to the _nav template - the _nav template itself can now end with either .html.erb or .erb
- Removing feature: optionalized nested params (this was a bad idea)
- enum partials now correctly render within a namespace
- fixes for detecting missing belongs_to relationships
- fixes to post-create and post-update parental reloads
- refactors passdown strategy when nested
v0.6.9.2 - adds alt_lookup to related_set_field.rb and fixes a variable passdown problem in edit.html.erb
(released to rubygems 2024-12-17)
• adds alt_lookup to related_set_field.rb and fixes a variable passdown problem in edit.html.erb
v0.6.9 - `--record-scope` feature and fixes in nesting and `--big-edit`
Record scope allows you to apply a model based scope for the controller being generated.
This is applied on top of all other scopes, searches, and modifiers applied to the built controller.
bin/rails :generate hot_glue:scaffold Order --record-scope='.is_open'
Be sure to use single quotes ('
) and don't forget the dot (.
) before your scope(s).
Make sure your Order model has a scope is_open
, like so:
scope :is_open, -> {where(state == 'open')}
Now all records displayed through the generated controller
More fixes:
• --big-edit
now always uses non-turbo form submits, for update + magic buttons; this fixes the awkward save interaction that took the user to the otherwise unfindable show screen.
• refactor of modified datetime feature to prefer current user as set by the --auth setting (will not work in @gd
mode). future implementation will further refine
• when using big edit, update.turbo_stream.erb
is no longer written
• removes Pundit policy_scope() around new operations
• refactors to how parent objects from a nested controller pass these variables to lower-level partials; this implementation hard-codes the nested set as locals and also builds a nested_for
key (string)
v0.6.8 - adds back alt lookups and more
• fixes in modify_date_inputs_on_params for current_user_object
• adds back alt_lookup feature from version 0.5.7; use with --alt-foreign-key-lookup
• badges can be added to modified fields using [
and ]
which come after the modification flag inside {...}
.
for booleans separate with pipes |
• you can add badges to fields that have no other modification using the none
modifier
Full Changelog: v0.6.7...v0.6.8
v0.6.7 - Patch for my non-:00 seconds for datetimes
Patch for my non-:00 seconds problem. I have discovered that the root of my issues was a quirk in how browsers display datetime-local fields.
This implementation favors a no-seconds approach, which is a good idea for most applications. If you need seconds, you should use a different approach.
here is a note about the problem:
# note: as according to https://stackoverflow.com/questions/20111413/html5-datetime-local-control-how-to-hide-seconds
# there is no way to tell the browser not to display seconds in the datetime-local input field
# as I have implemented a "seconds don't matter" solution,
# the only solution is to avoid setting any non-00 datetime values into the database
# if they already exist in your database, you should zero them out
# or apply .change(sec: 0) when displaying them as output in the form
# this will prevent seconds from being added by the browser
v0.6.6.1 - Adds `hg-` and other fixes
- Adds hg- classes to the form fields for easier styling
(add this css to your app)
div.hg-heading-row {
background-color: #aab7d1;
font-weight: bold;
}
div.hg-row {
border: solid 1px grey;
}
.hg-col {
border: solid 1px grey;
overflow: hidden;
}
- Fixes in
modify_date_inputs_on_params
- Fixes in named_variants for Rails 7.1 (applies to attachments)
v0.6.6 - Refactor contextual timezone support
• Major refactor of contextual timezone support
NEW INSTALL: your current_user object should have
(1) a field on the database time_zone (notice underscore) this is a string field storing the name of the Rails timezone,
(2) a method like
def timezone ActiveSupport::TimeZone[time_zone] end
(notice no underscore in method name) This method returns a TimeZone object
UPGRADING: you will need to convert your existing timezone fields which were previously offset integers into strings using a new string field on your user object time_zone (notice underscores)
v0.6.5 - Adds timezone dropdown support, other fixes
• Adds timezone support as a modify
option
rails generate hot_glue:scaffold User --include=my_timezone --modify='my_timezone{timezone}'
Note that my_timezone
is a string field on the User object. By specifying like so above, hot glue will generate a dropdown list of timezones using the rails time_zone_select
helper.
Unlike the previous implementation, which used timezone
, this one uses the Rails locale names as provided by the name method returned from the ActiveSupport::TimeZone object. full parity is still WIP but I intend to create a seamless backwards-compatible bridge
• Fixes redisplay issue on big edit
• Fix for time parsing
v0.6.4 - More pickup partials + Rails 7.1 fix
(rerelease of v6.0.3.3)
• Adds pickup partials for
_index_before_list
_list_after_each_row
_list_after_each_row_heading
Remember, to use pickup partials these partials must exist in the build folder at the time you are building scaffolding.
• Fixes issue with Rails 7.1 when using --no-edit
or --no-delete
flags
(Rails 7.1 enforces the presence of action names flagged with only
on the before hook, which caused The show action could not be found for the :load_charge callback...
)
v0.6.3.3 - More pickup partials + Rails 7.1 fix
• Adds pickup partials for
_index_before_list
_list_after_each_row
_list_after_each_row_heading
Remember, to use pickup partials these partials must exist in the build folder at the time you are building scaffolding.
• Fixes issue with Rails 7.1 when using --no-edit
or --no-delete
flags
(Rails 7.1 enforces the presence of action names flagged with only
on the before hook, which caused The show action could not be found for the :load_charge callback...
)