The flow for my application, for non-logined users, looks like this:
1) non-logined user does a given action that requires login (arbitrary)
2) dialog appears for non-logined user and he logins without any refreshing of the page
3) collecting of additional information if it is new user
3) the given action should be executed
How can i...
Since we can structure a MongoDB any way we want, we can do it this way
{ products:
[
{ date: "2010-09-08", data: { pageviews: 23, timeOnPage: 178 }},
{ date: "2010-09-09", data: { pageviews: 36, timeOnPage: 202 }}
],
brands:
[
{ date: "2010-09-08", data: { pageviews: 123, timeOnPage: 210 }},
{ date: "2010-09-09"...
Here is my config:
user nobody nobody;
worker_processes 2;
error_log /rails/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
passenger_root /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.15;
passenger_ruby /usr/loca...
Hi,
I created a scaffold dum num:integer name:string
When I create a new dum, I wanted to use flash to print out the values of the number inputed into the form in the controller.
For example:
User enter the webbrowser
clicks create new dum
then enters the num and name then press submit
submit triggers the create call in the controlle...
What's the best way to get the currently selected tab via the tab panel's id?
My tabs which presents comments looks as follows.
<a_comment_form>
<div id='#tabs'>
<ul>
<li><a href="url_to_ajax_resource" title="div1_server_index"></li>
<li><a href="url_to_ajax_resource" title="div2_server_index"></li>
</ul>
<div id='div1_server_index'>
...
Hi,
I was wondering if there is a way to use radio button to set the value of a field that is a text box.
<%= radio_button("demographics_questionaires", "gender", "Male")%> Male <br\>
<%= radio_button("demographics_questionaires", "gender", "Female")%> Female <<br\>
<%= radio_button("demographics_questionaires", "gender", ...
Hello everybody, I wanna make a contact us form in Rails 3 with the fields name, email, message title and message body but I don't know how to do it. The posted messages are intended to go to my email address so I don't necessarily must store the messages in the DB. Do I have to use ActionMailer, any gem or plugin for it? Any help is app...
I was just reading about Gems/Plugin development for Rails 3 and ran across this post that says that alias_method_chain is no longer used. I can see the method is still there in activesupport-3.0.0/lib/active_support/core_ext/module/aliasing.rb.
Should I still be using alias_method_chain in Rails 3?
Is this still reflective of the best...
I'd like to send an email from my rails3 application to a set of users but have a dummy To address.
For example:
To: Some Entity
From: Some Entity
Bcc: [email protected], [email protected], [email protected]
However, since ActionMailer leaves it up to the MTA to parse out the email addresses to send to (as opposed to passing an explicit re...
OK, so I've been toying with different ways of organizing my Rails 3 apps regarding STI and Polymorphic Associations. I was trying to find a way that is both easy to code, and easy to use, and has the highest chance of being the most compatible with any future changes. After alot of reading a lot of optionated (and often lacking and po...
When Rails applications seem hard to deploy (or used to be), what about Django, TurboGears, Symfony, CakePHP -- can they be simply deployed using mod_python or mod_php? Actually, won't it need something like a mod_django so that the code can run in a "Django" environment? (Just like Rails' script/console or Rails 3's rails console)
...
Hi.
How can I create a production database in Rails 3 and load a schema to it?
I tried the following approaches...
I.
rake db:create Rails.env='production'
Rails 3.0.0;
Sqlite3 3.7.2.
...
I'm just getting started with Ruby on Rails development and I have a question concerning source code "privacy".
From what I know so far (i have not done a deployment yet, only used RoR in a local development environment), that when a RoR application is deployed, all the source code is "visible" on the server?
How can I protect my code;...
My client wants to have a calendar picker with support for time zones. Right now they are using the venerable calendar_date_select picker
http://code.google.com/p/calendardateselect/
Which has no support for time zones. Surprisingly, I can't find any other plugins or other help in handling this. I would think this was a common probl...
I'm getting 'Rails requires RubyGems >= 1.3.1. Please install RubyGems and try again: http://rubygems.rubyforge.org' error. However...
gem -v
Returns "1.3.7". afaict, I have RubyGems 1.3.7 installed...
Any help appreciated
...
Hi guys i have a model livestream which has two columns in the database, 'user_id' and 'activity_id'. Very straight forward.
Now when I try to insert multiple records into the database I get an invalid SQL statement:
SQLite3::SQLException: near ",": syntax error: INSERT INTO livestreams (user_id, activity_id)
VALUES (1, 2), ...
I have a Rails app that has a controller called domain which has a nested controller called subdomain and stats. I have defined them in routes.rb:
resources :domains do
resources :subdomains, :stats
end
I have changed the to_param of the domain and subdomain models to use the name of the domain, e.g.: the routing I get is http://s...
Hello there,
this might be a more general question, not just Rails related. I'm about to start working on an application that will need to employ some kind of caching strategy sooner or later.
How to approach caching when programming a web application? Should I think it through up front or is it a matter of a later decisions? And then...
Hi.
I was reindexing my model when I suddenly shutdown my mac,
When I try to reindex again using (Model_name).reindex in script/console I encountered an error that I haen't encountered before.
RSolr::RequestError: Solr Response: Severe_errors_in_solr_configuration__Check_your_log_files_for_more_detailed_information_on_what_may_be_wrong...
I am trying to implement this jQuery auto complete function but the problem is this i need the value of the previous input field. getting the value from the previous is easy, I just dont know how to add it to the call
the call for the previous value is on top of the document.ready and this doesnt get called when the user types
I NEED ...