-
Notifications
You must be signed in to change notification settings - Fork 87
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 model with namespace #83
base: master
Are you sure you want to change the base?
Conversation
if source.is_a?(Array) && source.first.is_a?(String) | ||
source.map { |v| { value: v, text: v } } | ||
source.inject({}){|hash, key| hash.merge(key => key)} |
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.
Space missing to the left of {.
Space between { and | missing.
Space missing inside }.
@@ -152,9 +135,11 @@ def format_source(source, value) | |||
if source.is_a?(Array) && source.first.is_a?(String) && source.size == 2 | |||
{ '1' => source[0], '0' => source[1] } | |||
end | |||
else | |||
when String |
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.
Indent when as deep as case.
else | ||
safe_join(source_values_for(value, source), tag(:br)) | ||
end | ||
safe_join(source_values_for(value, source), tag(:br)) unless %w(select checklist).include? data[:type] |
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. [116/80]
@@ -37,7 +37,7 @@ def editable(object, method, options = {}) | |||
nid = options.delete(:nid) | |||
nested = options.delete(:nested) | |||
title = options.delete(:title) do | |||
klass = nested ? object.class.const_get(nested.to_s.classify) : object.class | |||
klass = nested ? object.class.const_get(nested.to_s.singularize.capitalize) : object.class |
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. [104/80]
Line 40 it resolve the problem with namespace in the model with strong_params on controller.
proposal = Admin::Proposal.first
editable proposal
params on Controller will get "params[:proposal]" and not "params[:admin_proposal]"
I didn't get to compare version 1.5.5 correctty with master