-
Notifications
You must be signed in to change notification settings - Fork 8
Conversation
@Dantemss / @jpslav : This includes the review of: https://github.com/lml/unconfirm.
TODO:
|
- Add gem dependency. - Add configuration file for unconfirm. - Include JS and HTML. - Add migrations. - Modify free response and multiple choice submissions to use unconfirm.
For step 2, you could combine these 2 methods into 1. Actually, you could probably combine 2 and 5 into 1 method (it doesn't matter if the stuff in 2 is in the body, right? If necessary, you could even set some template variables to prevent the stuff in 2 from being included twice in the page). If you don't mind not using the asset pipeline, you could also put the javascript in 3 inline with 2 and 5. This would, however, mean the page would load marginally slower, as the browser would not cache the javascript. But it would probably be negligible. Personally I would probably combine 2 and 5, but keep 3 separate. |
@Dantemss - Thanks. Yeah, for step2 - I kept the methods separate as one inserts html and the other one JS. I could perhaps provide a third method that injects both together. yeah - I'd really like the loading to be separate from the script tags. It does make the page a lot slower. Do you know of a better way to deal with the helpers? |
I prefer to avoid helpers entirely and handle helper methods like this: https://github.com/openstax/action_interceptor/blob/master/lib/action_interceptor/view.rb I only have an |
If you need something from the controller object and/or if the method should also be available in controllers, I do it like this: https://github.com/openstax/action_interceptor/blob/master/lib/action_interceptor/controller.rb The only reason I needed both in action_interceptor is that, unfortunately, url_for works differently in controllers vs views (Rails "magic"). |
@@ -59,6 +59,8 @@ gem 'remotipart', '~> 1.0' | |||
gem 'babbler', '~> 1.0.0' | |||
gem 'sketchily', '~> 1.5.0' | |||
|
|||
gem 'unconfirm', path: '../unconfirm' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to replace this reference to a dir on your computer with the github repo or instead publish to rubygems
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah - I was waiting to see if the gem is good enough to be published. I will change it to the github repo for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jpslav - did you get a chance to take a look at the gem code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not. @Dantemss, can you take a look sometime in the coming weeks?
My inclination is to take it on faith now, subject to Kim's manual testing, and let us interact with it a bit in OST. Then when we integrate unconfirm into future products I'll definitely take a closer look.
Thanks for adding this functionality.
On Jun 27, 2014, at 8:48 PM, Lakshmi notifications@github.com wrote:
In Gemfile:
@@ -59,6 +59,8 @@ gem 'remotipart', '
> 1.0'> 1.0.0'
gem 'babbler', '
gem 'sketchily', '~> 1.5.0'+gem 'unconfirm', path: '../unconfirm'
@jpslav - did you get a chance to take a look at the gem code?—
Reply to this email directly or view it on GitHub.
to use unconfirm.