On 31 January 2015 at 18:00, Alex B. <lists@ruby-forum.com> wrote:
> I am having issue grasping how to accomplish interacting between two
> controller.
>
> My design is as follows: I am coding a Microblog. I can make
> posts, which are text, and need to extract hashtags from that content.
> Right now I use a form_for to get the input for the micropost. I have
> put in the models that a micropost has_many Hashtags and that Hashtags
> belongs_to micropost.
>
> My question is where do I put the code to do this? I can't seem to make
> a new hashtag directly from the view in a similar way as my microposts.
> My initial try was to put the extract code in the create method of the
> Post controller. Anything pointing me in the right direction would be
> great.
As I guess you are a beginner to Rails, I suggest you work right
through a good tutorial such as railstutorial.org (which is free to
use online). That will show you the basics of rails and should answer
your question, and a lot more that you will need to ask.
Colin
--
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%3D0gLuAzP54KTQvFYXwELW%3DosKjBZyUg4gp%2Bpea%3DqkF_MXP8w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment