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 model with namespace #83

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

brenoperucchi
Copy link

@brenoperucchi brenoperucchi commented Feb 17, 2017

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

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)}

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

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]

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

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]

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.

2 participants