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

Added body to events removed introduction/conclusion and properly display events on the show page #138

Closed
wants to merge 1 commit into from

Conversation

itsWill
Copy link
Contributor

@itsWill itsWill commented Dec 6, 2015

This fixes #106 and the outstanding tasks in #14

@nicholasjhenry

Review on Reviewable


expect(rendered).to have_link "#{event.title}", href: event_path(event)
end
end

Choose a reason for hiding this comment

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

Final newline missing.

factory :event do
title "event title"
body "event content"
location

Choose a reason for hiding this comment

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

Trailing whitespace detected.

@itsWill
Copy link
Contributor Author

itsWill commented Dec 10, 2015

rebased and ready to merge

@nicholasjhenry
Copy link
Contributor

Hey @itsWill -- thanks for putting this together. I wanted to get this merged in tonight but there's an error when running the migration from the start:

$ bin/rake db:migrate:reset
== 20140929233719 CreateEvents: migrating =====================================
-- create_table(:events)
   -> 0.0161s
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

Missing translated field :introduction/Users/nicholas/.rvm/gems/ruby-2.2.3@montreal-rb/gems/globalize-5.0.1/lib/globalize/active_record/migration.rb:139:in `b
lock in validate_translated_fields'

I know what the issue is, but a little tired now to think through a solution. Perhaps yourself or another contributor could take a look. Thanks!

@@ -1,4 +1,8 @@
class CreateEvents < ActiveRecord::Migration
class Event < ActiveRecord::Base
translates :title, :introduction, :conclusion
end
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The globalize translations are introduced in this migration then later removed, this causes an error in the rake db:migrate . This is a workaround to the issue @nicholasjhenry reported.

@itsWill
Copy link
Contributor Author

itsWill commented Dec 11, 2015

I added a work around to it, I managed to get it to work on my machine however without it, by doing a rake db:reset before the migrate.

@itsWill
Copy link
Contributor Author

itsWill commented Dec 12, 2015

rebased, and ready to merge.

@sophiedeziel
Copy link
Member

@itsWill can you rebase again? :)

assign(:events, [event])
render

expect(rendered).to have_link "#{event.title}", href: event_path(event)

Choose a reason for hiding this comment

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

Prefer to_s over string interpolation.

@sophiedeziel
Copy link
Member

new -> #196 (that way I could commit on the branch)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Simplify Event attributes
5 participants