Displaying 20 results from an estimated 1000 matches similar to: "multi model form"
2012 Feb 03
10
ruby on rails 3 tutorial book chapter9 Signin Failure
Hi I have problem trying to pass the signin failure test.
This is the test code of the sessions_controller.rb
def create
user = User.authenticate(params[:session][:email],
params[:session][:password])
if user.nil?
flash.now[:error] = "Invalid email/password combination."
@title = "Sign in"
render
2012 Jan 27
4
Redirecting to create new page with input
Rails 3.1.3
I believe this is a very very fundamental question, but since I am new
to Rails, it''s more productive to ask someone to point out what I need
to do.
Say, I have a search method that generates a list of youtube videos. I
have completed this part.
And also, I have set up a database, Video, whose fields are video_title
and URL.
I need to place a button to each of these video
2012 Mar 01
1
Testing selector order in RSpec
Could someone point me to a reference that explains how I would test
the order of elements on an HTML page?
For example, in RSpec I would like to verify that the content of one
<p> element appears before the content of another.
response.should have_selector("p", :content => "Should appear first")
response.should have_selector("p", :content =>
2012 Apr 18
1
Re: validates_uniqueness_of question
Hi All,
I am trying write a validation rule where I need to ensure that when a
certain value is updated or created in a particular columns, a number of
other columns columns are unique and that another column does not contain a
certain value.
I have been able to use the validates_uniqueness_of :column_a (to be
updated or inserted) with , :scope =>
[ :column_b , :column_c , :column_d ]
2012 Feb 07
2
how to assign edit/remove privileges for only own details and not on others?
Hello,I am quite new on rails. Currently making CRUD apps in rails 3.0
in windows.
I''ve used devise [1.1.rc0] for authentication.In those apps any logged
in user can change other user''s details.
How can I design the app, so that any logged in user can edit/remove
his details only if he wishes to do so and can only view others''
records.
After logging in he should be
2012 Mar 11
1
notifications (or flash messages) in an api application
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello!
As a noob in rails, i am having a problem on how to find a decent and straightforward notifications system for my application.
Being a Api like application (talking with the client is made using JSON / later on XML as well), i have a problem finding a good solution to feed my needs.
I have tried to use the rails validators, but then i have
2012 Feb 04
3
the ^ and % operators in context
The % is modulus (remainder) operator and ^ is bitwise. In this
context, we take a file, and go through each character and encrypt it.
But why are the ^ and % operators used here:
def encrypt(reader, writer)
key_index = 0
while not reader.eof?
clear_char = reader.getc
encrypted_char = clear_char ^ @key[key_index]
writer.putc(encrypted_char)
key_index = (key_index +
2012 Feb 09
7
ruby script/server is not working
hi everyone i just typed ruby script/server -d and then after when i
type again it is not working. i got this error
[2012-02-09 16:19:54] WARN TCPServer Error: Address already in use -
bind(2)
Exiting
/usr/lib/ruby/1.8/webrick/utils.rb:73:in `initialize'': Address already
in use - bind(2) (Errno::EADDRINUSE)
from /usr/lib/ruby/1.8/webrick/utils.rb:73:in `new''
from
2010 Aug 12
10
Scaffolding working...kinda
Hello all. I''ve been working through some online tutorials, learning ROR
and have a question on scaffolding. Through the command promt i''ve ran
the command:
$ script/generate scaffold Albums
This created the controllers, helpers, models, and views.
I have a database table titled "albums" and have two records saved
within
The problem is that the scaffold command did
2011 Oct 05
3
Rails 3 Select_tag in javascript give missing ; error
When I write
var x = "<%= select_tag(:activity_group,
options_for_select(activity_grp),{:include_blank => ''Create New
Group'', :style => ''width: 100px''}) %>";
where <% activity_grp = @activity_group.map { |ag| [ag.name,
ag.id] } %>
However, I get error (missing ; before statement) in Firebug because
var x = "<select
2012 Feb 07
10
Ruby Developer position
Please let me know your interest in following.
Location: Columbia, SC
Duration: 12 months+
Rate: $65/hr 1099/c2c
Required Skills:
RUBY, RAILS, GIT, MYSQL, CUCUMBER, RSPEC, JQUERY, EXCELLENT ORAL AND WRITTEN
COMMUNICATION SKILLS, TEST-DRIVEN DEVELOPMENT, LINUX, OS X, JSON, COMMAND
LINE, SQL, SSH, HAML, SCSS
Thanks
Sandeep
Sandeep Jain
Software People Inc.
www.softwarepeople.us
2012 Feb 17
5
undefined method `key?' for nil:NilClass PaperClip
Hello, I have a problem with the paperclip, I put on my GemFile
gem "paperclip", "~> 2.6.0"
I create a migrate
class FileUpload < ActiveRecord::Migration
def up
change_table :projects do |t|
t.has_attached_file :image
end
end
def down
drop_attached_file :projects, :image
end
end
on my model I put
class Project < ActiveRecord::Base
2012 Feb 14
4
What I'm doing wrong, has_and_belong_to_many
Hello, I''m trying to insert into my migrate but when I try on rails
console this error shows:
1.9.3-p0 :001 > group = Group.new
=> #<Group id: nil, name: nil, description: nil, created_at: nil,
updated_at: nil>
1.9.3-p0 :002 > group.name = "Group Name"
=> "Group Name"
1.9.3-p0 :003 > group.description = "Description"
=>
2011 Nov 29
2
image with Content-Type: text/html;
i have images such as this
http://www.cairo360.com/resource.servlet?path=event/6178/event_standard_6178_20112111_542213373.jpeg
its Content-Type: text/html;
"carrierwave" dosent recognize it as image
is there is any way to fix that ?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk"
2011 Nov 04
5
Beating the Top-Posting Dead Horse
On Fri, Nov 4, 2011 at 12:44, BeeRich <beerich-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> As for top posting, that is an old school habit.
Er, no it isn''t. You young punks wouldn''t know old-school if it bit
you in the diapers! Now get off my lawn! ;-)
Seriously though, REAL old-school quoting is interleaved point by
point, with anything irrelevant trimmed
2011 Nov 26
1
ActionController::RoutingError (No route matches [GET] "/image.jpg"):
I am using rails 3.1.3.
Inside config/ application -> config.assets.enabled = true
Inside development.rb -> config.assets.compress = false
Inside production.rb -> config.serve_static_assets = false;
config.assets.compile = false
I have images placed in assets/images. If i do localhost:3000/assets/
image I get the image in the browser, but
unfortunately, on the browser i am
2012 Aug 16
1
How to create subpages.
What I am trying to do is create subpages within the main page.
So if the top navigation is
- Home
www.example.com/
- About
www.example.com/about
- Contact
www.example.com/contact
- Support
www.example.com/support
I would want a sub navigation under the pages like so;
- Home
www.example.com/
- About
www.example.com/about
----- History
www.example.com/about/history
----- Locations
2011 Nov 10
2
Rails nested Routing
Hi there!
I experienced an issue with routing.
Basically, I''m trying to follow step-by-step the Rails'' official guides
process for what concerns the nested routing.
So, I have Newspapers that has_many :ads , and :ads belongs to
:newspaper .
What I did was simply trying to obtain an URL like this:
http://localhost/newspapers/1/ads/1
but when I set routes.rb in this way:
2010 Aug 13
10
:limit text mysql
I have a rails 3.rc app that I''m developing. I have a text entry in one
my models that can sometimes be quite big. I tried setting :limit =>
4294967296 on the text column in my migration file but this doesn''t seem
to have any effect. The column is till created as a TEXT column rather
than MEDIUMTEXT or LONGTEXT.
Does anyone have any idea why this might be happening? Is there
2012 Aug 09
3
Pop quiz: Where do you watch for job postings?
Hi all, I''m looking for some advice on where we should be putting an
advert if we are looking to hire a full time rails developer? Or turning
it around what websites (or mailing lists) do folks here use to if they
feel the need for a change in view from their desk?
A few details to narrow down scope since it might affect the advice,
apologies in advance, trying to NOT make this an