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

Fixing Council pages, #150

Merged
merged 25 commits into from
Apr 6, 2015
Merged

Fixing Council pages, #150

merged 25 commits into from
Apr 6, 2015

Conversation

davidwessman
Copy link
Member

Removes all mentions of the_role actions, fixing old controllers.

Album-, workpost-controllers are not in used at the moment and I will not implement tests for them now.

params.fetch(:album,{}).permit(:title,:description,:author,:location,:public,:start_date,:end_date,:album_category_ids => [],:subcategory_ids => [],images_parameters: [:id, :foto])
params.fetch(:album, {}).permit(:title, :description, :author, :location,
:public, :start_date, :end_date, album_category_ids: [],
subcategory_ids: [], images_parameters: [:id, :foto])

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Align the elements of a hash literal if they span more than one line.

@davidwessman
Copy link
Member Author

Fixing #148 and #149

params.fetch(:album,{}).permit(:title,:description,:author,:location,:public,:start_date,:end_date,:album_category_ids => [],:subcategory_ids => [],images_parameters: [:id, :foto])
params.require(:album).permit(:title, :description, :author, :location,
:public, :start_date, :end_date, album_category_ids: [],
subcategory_ids: [], images_parameters: [:id, :foto])

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Align the elements of a hash literal if they span more than one line.

@davidwessman davidwessman mentioned this pull request Mar 31, 2015
elsif i == 2
return self.end
case view_status
when :before

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indent when as deep as case.

belongs_to :page
has_attached_file :picture,
styles: { original: '4000x4000>', large: '1500x1500>',
small: '250x250>', thumb: '100x100>' },

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Align the elements of a hash literal if they span more than one line.

can :manage, Candidate, profile_id: user.profile.id
can :manage, Nomination
can [:show,:avatar], Profile

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Space missing after comma.

@@ -18,15 +20,21 @@ class Profile < ActiveRecord::Base
validates :name, :lastname, presence: true, on: :update
validates :start_year, inclusion: { in: 1954..(Time.zone.today.year + 1) }, on: :update

scope :search_names, ->(name,lastname) { where('name LIKE ? AND lastname LIKE ?',"%#{name}%","%#{lastname}%")}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [112/100]
Space missing after comma.
Space missing inside }.

@@ -16,17 +18,25 @@ class Profile < ActiveRecord::Base
validates_attachment_content_type :avatar, content_type: /\Aimage\/.*\Z/
# Only on update!
validates :name, :lastname, presence: true, on: :update
validates :start_year, inclusion: { in: 1954..(Time.zone.today.year + 1) }, on: :update
validates :start_year, inclusion: {in: 1954..(Time.zone.today.year + 1)}, on: :update

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Space inside { missing.
Space inside } missing.

davidwessman added a commit that referenced this pull request Apr 6, 2015
Fixing Council pages and lots of other things.
@davidwessman davidwessman merged commit 83f5b59 into master Apr 6, 2015
@ghost
Copy link

ghost commented Apr 6, 2015

This PR was deployed to Production. Reference: 83f5b59

@davidwessman
Copy link
Member Author

The page link on the edit page doesn't work.
I think that is because I changed the page controller. Would need to fix this in the console.

@davidwessman davidwessman deleted the FixCouncilPage branch April 10, 2015 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants