Ruby on Rails Wednesday, April 1, 2015

On 1 April 2015 at 15:55, Jhonnatan Mc <lists@ruby-forum.com> wrote:
> Colin Law wrote in post #1171296:
>> On 1 April 2015 at 14:56, Jhonnatan Mc <lists@ruby-forum.com> wrote:
>>>> Colin
>>>
>>> I corrected the code in the repo. The file name is user_service.rb and
>>> the class name is : UserService.
>>
>> That is not what this says the file name is
>>
> https://github.com/JhonnatanMc/Object_Service_RoR/tree/master/prueba/app/services
>> It says it is "Class user_service.rb"
>>
>> Colin
>
> I corrected the name:

I am glad it is all working at last.

Colin

>
> #App/Controller/user_controller
> def create
> @user = UserService.create(user_params)
> end
>
> #App/services/user_service.rb
>
> class UserService
>
>
> def self.create(user_params)
>
> @user = User.new(user_params)
> ...
> end
> end
>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/ca5b89f527d91b14cd559e1e5ad51f5e%40ruby-forum.com.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLsxT0NXCG%2BbX02Oba-yQAjXK%3DOD8Dco9fkWD7gqw951_w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment