English 中文(简体)
在铁路 co中穿“vor子”吗?
原标题:Storing "favorites" in a Rails cookie?

我试图把我的网址与不进行用户登记这一zy想法相脱节。

不管怎么说,当用户在“项目”之外点击“favorite”时,我希望用户能够在该网站上“favorite”项目。

我假定我需要为此使用厨师,但我不知道下一步工作。 是否有任何人向我指出了正确的方向?

感谢!

最佳回答

并非具体,但我不喜欢在一个厨师中stor住太多 st的想法。 相反,我将其储存在我的网站上的数据库上,只是把钥匙的价值放在桌面上。 这样,你就能够像你一样储存太多或少一点,而不会传播太多的资金。 “无登记”办法的缺点是,如果它们改用新的计算机,甚至在同一计算机上安装新的浏览器,就会失去所有储存的数据。

我的用意是,储存一个带有“实权”的 co。 然后,我有几张表格,一只储存单项数据,如上届会议所看到的日期,而另一些则每届届会都储存多个物品。 例如,我有一个“占有权(占有权、国家)”表格,为每个国家储存一个记录,个人从美国国家名单中选择。

最后一个日期的仓储原因之一是,我从数据库中提炼了两年来的 t(因为我在创建厨师时任满两年)。

问题回答

或许,你可以更多地了解铁路的 co。 http://www.quarkruby.com/2007/10/21/sessions-and-cookies-in-ruby-on-rails”rel=“nofollow noreferer”>link 关于这一问题的信息很多。 我认为,你将赞赏!

但是,采取一些谨慎态度,不要用厨师储存太多的信息。





相关问题
rails collection_select vs. select

collection_select and select Rails helpers: Which one should I use? I can t see a difference in both ways. Both helpers take a collection and generates options tags inside a select tag. Is there a ...

SSL slowness in EC2

We ve deployed our rails app to EC2. In our setup, we have two proxies on small instances behind round-robin DNS. These run nginx load balancers for a dynamically growing and shrinking farm of web ...

Auth-code with A-Za-z0-9 to use in an URL parameter

As part of a web application I need an auth-code to pass as a URL parameter. I am currently using (in Rails) : Digest::SHA1.hexdigest((object_id + rand(255)).to_s) Which provides long strings like : ...

RubyCAS-Client question: Rails

I ve installed RubyCAS-Client version 2.1.0 as a plugin within a rails app. It s working, but I d like to remove the ?ticket= in the url. Is this possible?

activerecord has_many :through find with one sql call

I have a these 3 models: class User < ActiveRecord::Base has_many :permissions, :dependent => :destroy has_many :roles, :through => :permissions end class Permission < ActiveRecord::...

Ordering a hash to xml: Rails

I m building an xml document from a hash. The xml attributes need to be in order. How can this be accomplished? hash.to_xml

Text Editor for Ruby-on-Rails

guys which text editor is good for Rubyonrails? i m using Windows and i was using E-Texteditor but its not free n its expired now can anyone plese tell me any free texteditor? n which one is best an ...

How to get SQL queries for each user where env is production

I’m developing an application dedicated to generate statistical reports, I would like that user after saving their stat report they save sql queries too. To do that I wrote the following module: ...

热门标签