Releases: BindaCMS/binda
New layout, new features.
How to upgrade
If you are coming from version 0.0.8.beta.3
please follow this steps:
- Add migration:
$ rails generate migration addVideoToBindaAssets
def change
add_column :binda_assets, :type, :string
add_column :binda_assets, :video, :string
end
- Run migration and the following task
$ rails db:migrate
Be aware that Binda::Asset
doesn't have a ImageUploader
anymore, which as been moved to Binda::Image
. The following helpers has_image
, get_image_url
, get_image_path
have been updated. Also note that Binda stores images into asset
folder so you might need to update your upload directory renaming it from asset
to image
.
Image large
and medium
version have been removed from image uploader. This is due to GIF generating memory leaks on production servers. This issue hasn't been totally solve, might be worth doing further investigation, possibly moving GIFs to another uploader. Please update your code accordingly.
- Create migration for Relation field.
rails generate migration CreateBindaRelation
create_table :binda_relations do |t|
t.integer :field_setting_id
t.references :fieldable, polymorphic: true, index: true
end
create_table :binda_relation_links do |t|
t.references :owner, polymorphic: true, index: true
t.references :dependent, polymorphic: true, index: true
t.timestamps
end
Now it's possible to update videos:
rails binda:add_video_feature
- Check that you have setup a
binda_field_settings_structures
table. If you havent, please add it to the current migration.
create_table :binda_field_settings_structures do |t|
t.belongs_to :field_setting
t.belongs_to :structure
end
- Add a migration for the preview
$ rails generate migration addPreview
Modify the migration file with these lines:
def change
add_column :binda_structures, :has_preview, :boolean, default: false
end
Run migrations
$ rails db:migrate
- If you don't have
app/models/b.rb
file, run the following command:
$ rails generate model B --no-migration --parent=::Binda::B
New Features
- Complete new skin, not totally polished yet, but sufficient
- Preview link for components
- Video field
- Default helpers available through the
B
class
Updates
- sorting components has been extracted to a specific page, also limited to 1000 entries.
- add documentation badge
- add test coverage
- components postion is set on
after_save
rather then incomponets#create
- update layout of index and sort components
- Add loader/warning for components sort index
- Remove jQuery File Upload plugin and created a custom one
- Remove tests about generators
- Add Select2 plugin
FIX
Infinite number of fixes
0.0.8.beta
Updates
- Better messages on component controller
- Better validation on field_type with allow_nil false
- Better generators output and cleaner install generator
- Official documentation moved to http://www.rubydoc.info/gems/binda
- Add Github markup do Yard for documentation
- Optimized test and add Selenium to support Ajax requests and javascript
- Removed get_repeater from DefaultHelpers as it didn't make any sense
- Add visual uploader!!! 🙌
- Enhanced repeaters sorting!!! 🙌
FIX
- Issue with task binda:upgrade_to_v007
- Issues with default helpers and field helpers
- Issues with get_selection_choice and get_checkbox_choice
- Save value of string belonging to repeaters in components and boards editors
- Error when creating selection/checkbox/radio in a repeater
- Binda::FieldSetting wrong association naming
- wrong association naming for has_many repeater in Binda::FieldSetting
- selection not appearing on repeater editor
v0.0.7
This is a major release and we are now at 0.0.7.
If you upgrade from 0.0.6 follow these steps:
Save on a .txt
file your website name and description. You will need to manually restore them later. Same goes for all fields which are set as strings
. They will be still available on the database but Binda won't recognised them anymore.
Upgrade Binda gem
bundle update
Now running bundle show binda
you should see version 0.0.7
Create first migration
rails g migration updateBinda
def change
add_reference :binda_settings, :structure, index: true
add_column :binda_structures, :instance_type, :string, null: false, default: 'component'
add_column :binda_texts, :type, :string
create_table :binda_choices_selects do |t|
t.belongs_to :choice, index: true
t.belongs_to :select, index: true
t.timestamps
end
remove_reference :binda_choices, :selectable, polymorphic: true
rename_table :binda_selects, :binda_selections
rename_table :binda_choices_selects, :binda_choices_selections
rename_column :binda_choices_selections, :select_id, :selection_id
rename_table :binda_settings, :binda_boards
end
Now run this migration
rails db:migrate
Setup new dashboard
Run this task. There is everything you need in it.
rails binda:upgrade_to_v007
Create second migration:
Now that everything is setup you can delete columns we are not going to use anymore.
rails g migration removeUselessColumns
def change
remove_column :binda_boards, :content, :text
remove_column :binda_boards, :is_true, :boolean, default: false
end
Run this migration as well
rails db:migrate
New features
- We now have boards!
Binda::Setting
has been dropped in favour ofBinda::Board
which is fully customizable from the CMS. - We have fully optimized Binda default helpers such as
get_components
- Add selections with select, radio and checkbox!
Strings
are now a model calledBinda::String
which means that if you upgrade you will lose all previous content related to any string field.
Binda v0.0.6 release
In order to update from the previous release you need to update the application schema with the following migration.
class AddColumnsToBindaFieldSettings < ActiveRecord::Migration[5.1]
def change
add_column :binda_field_settings, :allow_null, :boolean
add_reference :binda_field_settings, :default_choice, index: true
create_table :binda_choices do |t|
t.string :label
t.string :value
t.belongs_to :field_setting
t.references :selectable, polymorphic: true, index: true
t.timestamps
end
create_table :binda_selects do |t|
t.belongs_to :field_setting
t.references :fieldable, polymorphic: true, index: true
t.string :type
t.timestamps
end
end
end
Beta for Rails 5.1
v0.0.2 Add repeater
Stable release for Rails 5.0
v0.0.1 initial release