Tony Augustine wrote:> see i defined one method called campaign in the model and through a
> url i am tryong to pass two parameters like user_id and campaign_id
> into a method called mail_open_count. how i can pass 2 that method.
>
>
> def campaign(campaign)
> @campaign_id = "[#{campaign.email_campaign_content.campaign_id}]
"
> @user_id = "[#{campaign.user_id}] "
> setup_email(campaign)
> mail_template = campaign.active_email_template
> template = Liquid::Template.parse(mail_template.body)
> body :body => template.render("bgcolor1" =>
> mail_template.colours[:colour1],"bgcolor2" =>
> mail_template.colours[:colour2],"bgcolor3" =>
> mail_template.colours[:colour3])<< @user_id << @campaign_id
<< "<img
> src=''http://localhost:3005/usercount?user_id = #{@user_id} &
campaign_id
> = #{@campaign_id}
> ''>"
> whre is user count is defined in routel like this
>
> map.usercount "usercount", :controller =>
"campaigns", :action =>
> "save_for_email_opens"
>
> if i wanted the parameters user_id and campaign id to store into a
> table named
>
> campaign_mail_count how can i write the method in d controller
Hi,
You can try do it like to:
link_to "hello", campain_path(:user_is => 4, :campain_id => 2)
Greg
--
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 post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.