Skip to content

GitLab

  • Menu
    • Projects Groups Snippets
      Help
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Merge requests
  • !5805

Merged
Created 11 years ago by Administrator@rootOwner

Fixed some deprecation warnings

  • Overview 7
  • Commits 5
  • Changes 4

Created by: jvanbaarsen

Fixed some deprecation warnings

Request to merge github/fork/jvanbaarsen/rails4 into rails4
  • Download as
  • Email patches

  • Plain diff

Checking approval status

Merged by (Jun 20, 2025 8:22pm UTC)

The changes were merged into rails4 with 4b84de4a

The source branch has been deleted


  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: jvanbaarsen

    @randx Good te merge (Removed the items with that where causing the errors)

    By Administrator on 2013-12-09T17:42:35 (imported from GitLab project)

  • Administrator
    Administrator @root started a thread on commit 4b84de4a 11 years ago
    app/models/event.rb
    18 18 attr_accessible :project, :action, :data, :author_id, :project_id,
    19 19 :target_id, :target_type
    20 20
    21 default_scope where("author_id IS NOT NULL")
    21 default_scope { where.not(author_id: nil) }
    • Administrator
      Administrator @root · 11 years ago
      Owner

      Created by: zzet

      @jvanbaarsen try

      default_scope { where.not(author_id: nil) }

      By Administrator on 2013-12-09T21:19:33 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: dzaporozhets

    @jvanbaarsen tests are ok?

    By Administrator on 2013-12-09T21:02:14 (imported from GitLab project)

  • Administrator
    Administrator @root started a thread on commit 4b84de4a 11 years ago
    app/models/user.rb
    80 80 # Groups
    81 81 has_many :users_groups, dependent: :destroy
    82 82 has_many :groups, through: :users_groups
    83 has_many :owned_groups, through: :users_groups, source: :group, conditions: { users_groups: { group_access: UsersGroup::OWNER } }
    84
    83 has_many :owned_groups, -> { where users_groups: { group_access: UsersGroup::OWNER } }, through: :users_groups, source: :group
    • Administrator
      Administrator @root · 11 years ago
      Owner

      Created by: dzaporozhets

      users_groups :)

      By Administrator on 2013-12-09T21:19:33 (imported from GitLab project)

  • Administrator
    Administrator @root started a thread on commit 4b84de4a 11 years ago
    app/models/user.rb
    80 80 # Groups
    81 81 has_many :users_groups, dependent: :destroy
    82 82 has_many :groups, through: :users_groups
    83 has_many :owned_groups, through: :users_groups, source: :group, conditions: { users_groups: { group_access: UsersGroup::OWNER } }
    84
    83 has_many :owned_groups, -> { where users_groups: { group_access: UsersGroup::OWNER } }, through: :users_groups, source: :group
    • Administrator
      Administrator @root · 11 years ago
      Owner

      Created by: jvanbaarsen

      Weird, the test are passing.. Good catch! Will fix it :-)

      By Administrator on 2013-12-09T21:19:33 (imported from GitLab project)

  • Administrator
    Administrator @root started a thread on commit 4b84de4a 11 years ago
    app/models/project.rb
    42 42
    43 43 # Relations
    44 44 belongs_to :creator, foreign_key: "creator_id", class_name: "User"
    45 belongs_to :group, foreign_key: "namespace_id", conditions: "type = 'Group'"
    45 belongs_to :group, -> { where(type: Group) }, foreign_key: "namespace_id"
    46 46 belongs_to :namespace
    47 47
    48 has_one :last_event, class_name: 'Event', order: 'events.created_at DESC', foreign_key: 'project_id'
    48 has_one :last_event, -> {order 'events.created_at DESC'}, class_name: 'Event', foreign_key: 'project_id'
    • Administrator
      Administrator @root · 11 years ago
      Owner

      Created by: zzet

      @jvanbaarsen I think better to follow for code style guide:

      has_one :last_event, -> { order(events: { created_at: :desc }) }, class_name: 'Event', foreign_key: :project_id

      order(field: :type) better then order field: :type or order 'field TYPE' foreign_key: :project_id better then foreign_key: "project_id" class_name: Event (class_name: 'Event'.freeze ugly) better then class_name: 'Event'

      @randx that do you think?

      By Administrator on 2013-12-09T21:26:11 (imported from GitLab project)

  • Administrator
    Administrator @root started a thread on commit 4b84de4a 11 years ago
    app/models/project.rb
    59 59 has_many :events, dependent: :destroy
    60 60 has_many :merge_requests, dependent: :destroy, foreign_key: "target_project_id"
    61 61 has_many :fork_merge_requests,dependent: :destroy, foreign_key: "source_project_id", class_name: MergeRequest
    62 has_many :issues, dependent: :destroy, order: "state DESC, created_at DESC"
    62 has_many :issues, -> { order "state DESC, created_at DESC" }, dependent: :destroy
    • Administrator
      Administrator @root · 11 years ago
      Owner

      Created by: zzet

      has_many :issues, -> { order(state: :desc, created_at: :desc) }, dependent: :destroy

      or

      has_many :issues, -> { order(state: :desc).order(created_at: :desc) }, dependent: :destroy

      By Administrator on 2013-12-09T21:27:42 (imported from GitLab project)

  • You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
Please register or sign in to reply
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Milestone
No milestone
None
None
Time tracking
No estimate or time spent
0
Labels
None
Assign labels
  • No matching results
  • Manage project labels
Lock merge request
Unlocked
1
1 participant
user avatar
Reference: gpt/large_projects/gitlabhq1!5805
Source branch: github/fork/jvanbaarsen/rails4

    0 pending comments

Menu

Projects Groups Snippets
Help