-
Notifications
You must be signed in to change notification settings - Fork 2
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
Feature: Persistence #63
Conversation
def tags | ||
(topics + tones + formats + user_tags).map(&:to_tag).uniq.sort | ||
end | ||
|
||
def tags=(ts) | ||
self.user_tags = ts.uniq.sort.collect{|t| UserTag.new(name: t) } |
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.
Prefer map
over collect
.
Space missing to the left of {.
Space between { and | missing.
# check if it should be zoomed, suppress if not | ||
!embed_zoomed?(name, binding[:zoom], options[:zoom]) | ||
return !embed_zoomed?(name, binding[:zoom], options[:zoom]) |
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.
Redundant return
detected.
…ts for deserializing
@@ -7,11 +7,11 @@ class Api::StoriesController < Api::BaseController | |||
filter_resources_by :series_id, :account_id | |||
|
|||
def resource | |||
@story ||= Story.published.visible.find_by_id(params[:id]) | |||
@story ||= params[:id] ? Story.published.visible.find_by_id(params[:id]) : Story.new |
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.
Line is too long. [88/80]
def longest_version | ||
audio_versions.sort_by(&:length).last | ||
end | ||
|
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.
Extra empty line detected at body end.
@@ -27,6 +27,10 @@ | |||
|
|||
class ActiveSupport::TestCase | |||
include FactoryGirl::Syntax::Methods | |||
|
|||
def api_request_opts(opts={}) |
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.
Surrounding space missing in default value assignment.
Story.published.visible.find_by_id(params[:id]) | ||
else | ||
Story.new | ||
end |
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.
end
at 19, 4 is not aligned with if
at 15, 15
@chrisrhoden - This should be good to go now, finally. |
@kookster looks good, working through merge conflicts now |
I can do that
|
Conflicts: app/controllers/api/picks_controller.rb app/controllers/concerns/hal_actions.rb app/representers/api/series_representer.rb app/representers/api/story_representer.rb app/representers/api/user_representer.rb test/controllers/concerns/hal_actions_test.rb
@@ -44,7 +44,7 @@ def params | |||
def current_user | |||
FactoryGirl.create(:user) | |||
end | |||
|
|||
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.
Trailing whitespace detected.
Support writing to the database via the API
Handle updating of models and database via API calls.