diveintohtml5 says it's okay to start using the email form type. So I am trying it out on one of my forms. I'm using jQuery and a plugin called jquery-watermark. It makes the placeholder element work across browsers. The plugin still works on Firefox 3.6 but on Opera 10.61 and Chrome 6 the placeholder isn't rendered.
<script type="text...
Rails 3 is out and every one is excited (etc etc).
However, I'm not ready to update to it yet for a couple reasons:
Not all gems I use are supported.
Just finally got my head around 2.3.x.
My client expects software that is reliable.
So, right now I'm running 2.3.5 and will be upgrading to 2.3.8 soon. But what about any security pat...
In order to find a Root Document that contains a embedded document using MongoID/Rails 3 I need to do my query this way:
QuoteRequest.where( "order_request_items._id" => BSON::ObjectID(params[:id]) ).first
Is there a way to query without using the BSON::ObjectID ?
Thanks!
...
I have a Rails controller with a form, and I want that when I post this form, a table on this page is updated via AJAX. I know a way, using partials to achieve this, but is that any way to do this without partials? And without putting code for my view inside my controller too.
Thanks
...
I need to create a local xml file from a rails application and then copy it to a location on another server.
I have tried using the File.new option to create a new file but it gives me an error saying the file does not exist. After looking closer at the documentation it says that File.new opens a file that already exists.
I can't see ...
I've to start my master thesis project and I've to choose a technology to work with. I've used Rails and ASP MVC, in two projects, but never used Django, only some play with it. But I've some experience with python and really like the admin interface.
The objective of my master thesis is a creation of portal to a public hospital.
I hav...
In my Rails (2.3, Ruby 1.8.7) application, I need to truncate a string to a certain length. the string is unicode, and when running tests in console, such as 'א'.length, I realized that a double length is returned. I would like an encoding-agnostic length, so that the same truncation would be done for a unicode string or a latin1 encoded...
Since Rails 3 is out, all the guides on http://guides.rubyonrails.org/ are for Rails 3. I used to reference the guides for 2.3 a lot. Is there anywhere they're still available?
...
Hi guys:
I get confuse now, I don't know how to delete/destroy a record in a join table:
class Task < ActiveRecord::Base
belongs_to :schema
belongs_to :to_do
end
class Todo < ActiveRecord::Base
belongs_to :schema
has_many :tasks
end
class Shcema < AcitveRecord::Base
has_many :todos
has_many :tasks, :through => :todos
e...
Hey guys,
Just a quick question,
when I do
request = Net::HTTP::Post.new(path)
Can I do
path = '/api/v1/baskets?apiKey=' + api_key + '&sig=' + sig + '&time=' + time
Where api_key sig and time are some string
or do I need to do
path = '/api/v1/baskets'
request.set_form_data({'apiKey' => api_key, 'sig' => sig, 'time' => time})
...
I have the AuthLogic plugin installed in my RoR app. I not creating an app that needs to be high security. But I would like it if admins can log in as a particular user without having to know each and every one of their passwords.
I cannot find where AuthLogic actually validates the entered password upon login.
Anyone have any recomme...
Rails 3.0.0, Passenger 2.2.15:
Create a new Rails project
Add gem 'paperclip', :git => 'git://github.com/lmumar/paperclip.git', :branch => 'rails3'
to your Gemfile
Do bundle install
Everything OK, starting with rails/script server & accessing also works
However, when accessing with Passenger, it says:
git://github.com/lmumar/papercli...
I have a Rails 3 app that uses RSpec2 as my testing framework, and I'm able to use autotest to watch my model and spec directories for changes and re-run my spec suite when files change.
I'd like to add a directory with some custom classes in it (RAILS_ROOT/lib/some_project/lib/*.rb) and their corresponding specs (RAILS_ROOT/spec/some_p...
In my Rails 3 app, I am creating a Book model which contains an ISBN column. This ISBN value will be a number 13 characters long. Which type should I use to create the ISBN column? Should I use an :integer or a :string? What is the maximum size of an integer in Rails?
rails g scaffold Book title:string isbn:integer
...
I would like to know some of the great opensource projects in Rails with some best practices and/or code standard including unit testing, so that I can learn some experiences from building apps from those sources.
...
As seen here: http://railstutorial.org/chapters/rails-flavored-ruby#top for the file:
app/helpers/application_helper.rb:
module ApplicationHelper
# Return a title on a per-page basis.
def title
base_title = "Ruby on Rails Tutorial Sample App"
if @title.nil?
base_title
else
"#{base_title} | #{@title}"
en...
I have a rails app deployed on Heroku. I want to add a feature that enables users of the app to set a reminder. I need some way for the app to schedule sending an email at the time specified by the user.
I have found numerous posts referring to using delayed_job for this, but none of the write-ups / tutorials / etc. that I have found ...
Hi, I use this:
<%= render :partial => 'shared/subscription' %>
To call this partial view:
<% form_for(:subscription, :url => city_subscriptions_path(@city)) do |form| %>
<%= form.hidden_field :city_id, :value => @city.id %>
<%= form.text_field :email, :size => 30 %>
<%= form.submit "Email Me" %>
<% end %>
Since I am using th...
I have a model which has a field called deleted, which is used to mark those deleted items.
So normally I would just want to query those having deleted = false items, and in some special cases to list those deleted items for restoring.
Is it possible to do that? What I could do now is just using a named scope having :conditions => {:de...
On form 1, I have a formtastic date_select field.
= f.input :date_from, :discard_day => true,
:discard_month => true,
:order => [:year],
:start_year => 1950,
:end_year => Date.today.year,
:include_blank => ...