Skip to content
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

Fix Rails version #24

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion db/migrate/001_create_toggl_time_entries.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateTogglTimeEntries < ActiveRecord::Migration
class CreateTogglTimeEntries < Rails.version < '5.1' ? ActiveRecord::Migration : ActiveRecord::Migration[4.2]
def change
create_table :toggl_time_entries do |t|
end
Expand Down
4 changes: 2 additions & 2 deletions db/migrate/002_create_api_key_field.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateApiKeyField < ActiveRecord::Migration
class CreateApiKeyField < Rails.version < '5.1' ? ActiveRecord::Migration : ActiveRecord::Migration[4.2]

def up
custom_field = CustomField.new_subclass_instance('UserCustomField', {
Expand All @@ -20,4 +20,4 @@ def down
CustomField.find_by_name('Toggl API Key').destroy
end

end
end
2 changes: 1 addition & 1 deletion db/migrate/003_set_api_key_not_visible.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class SetApiKeyNotVisible < ActiveRecord::Migration
class SetApiKeyNotVisible < Rails.version < '5.1' ? ActiveRecord::Migration : ActiveRecord::Migration[4.2]

def up
custom_field = CustomField.find_by_name('Toggl API Key')
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/004_create_workspace_field.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateWorkspaceField < ActiveRecord::Migration
class CreateWorkspaceField < Rails.version < '5.1' ? ActiveRecord::Migration : ActiveRecord::Migration[4.2]

def up
custom_field = CustomField.new_subclass_instance('UserCustomField', {
Expand Down