My product table is
idtype price location
1 chips $3 aisle3
I have a question with adding the products in groups.
There is a quantity field(nonmodel) where the user can enter the
quantity
While adding a new product if the user enters:
type: soda
when i click a button called add it shouldshow a javascript form
showing an uploadfeature.its not displaying anything.instead of
tht its only showing the mwssage lik tis in console. please providee
a solution
ActionView::TemplateError (Called id for nil, which would mistakenly
As you now URL its a GET method, but according
RESTful rules create it's a POST method.
Rails defines seven controller methods for RESTful resources by
convention. They are:
Action HTTP Method Purpose
-
indexGET
Cucumber?
It could be quite quick to throw together a simple application to manage
something (stocks of products) and test it using Cucumber which looks very
cool when you first see it.
Cheers,
Andy
--
Andy Jeffries
http://andyjeffries.co.uk/ #rubyonrails #mysql #jquery
Registered
On 20 March 2010 00:33, nshenry03 nshenr...@gmail.com wrote:
I am simply trying to backup a ruby on rails app... I have created an
archive of the entire database and application folders on server A...
I then restore the database and application folders on server B
Server B is exactly the
Great response, Michael. I now have a clean validation on the
compiled code, but I've still got a problem.
I've got clean code that validates. http://www.pastie.org/882256
displays:
- new.html.erb
- HTML generated for new.html.erb
- Validation for generated html, which has one spurious (IMHO)
Hi Hassan, please take a look at my reply to Michael.
On Mar 22, 6:11 pm, Hassan Schroeder hassan.schroe...@gmail.com
wrote:
On Mon, Mar 22, 2010 at 2:51 PM, RichardOnRails
richarddummymailbox58...@uscomputergurus.com wrote:
Thanks for joining the conversation. I ran my the HTML page which
Hi Frederick,
As I mentioned to Colin, I would start a new thread on this question,
which is at
ActionView::TemplateError (Called id for nil, which would mistakenly be
4 -- if you really wanted the id of nil, use object_id) on line #1 of
app/views/lists/import.js.rjs:
1: id = dom_id(@list)
Will need to see some code - however the simple answer from your error
is that @list is nil.
Top link in google:
http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/39739e012b09f97a/7364aa0c8bf5050f
Read the replies about scaffolding basically you'll need to install the
scaffolding gem:
From a command prompt in your app root:
ruby script/plugin install scaffolding
Hi
I have a doubt. Dont know it is valid. Just asking. I am trying to
reuse the same partial _form for both new and edit. So from new.html.erb
I call partial like
%= render :partial = 'user_fields', :locals = {:f = f}%
and in _user_fields.html.erb an example field as
p
%= u.label
Hey, I'm relatively new to Rails. (I was actually a Merb guy before)
and I'm getting my feet wet with the beta.
It doesn't appear that auto trim is enabled with Erubis by default.
What's the proper way to enable this?
--
You received this message because you are subscribed to the Google Groups
Any chance they are available for download somewhere? Seems like they
are currently only playable with the embedded flash player.
Sometimes nice to be able to watch these on the bus.
On Mar 22, 3:10 am, comopasta Gr li...@ruby-forum.com wrote:
Thanks! Already picked a couple that I'll be
My question is if I call this same partial in edit.html.erb also,
how can I apply the h() method like below (since this fields being
populated with value from db being an edit form)
p
%=h u.label :first_name,'First Name' %
%=h u.text_field :first_name,:maxlength = 50 %
On 23 Mar, 07:46, Tom Mac li...@ruby-forum.com wrote:
Hi
I have a doubt. Dont know it is valid. Just asking. I am trying to
reuse the same partial _form for both new and edit. So from new.html.erb
I call partial like
Well it is valid but not useful - The label help would generate
On 23 Mar, 07:33, RichardOnRails
richarddummymailbox58...@uscomputergurus.com wrote:
Hi Frederick,
As I mentioned to Colin, I would start a new thread on this question,
which is
athttp://groups.google.com/group/rubyonrails-talk/tree/browse_frm/threa...
Thanks for looking into my
Hi,
Can anybody give me some clues how to use ActsAsTaggableOn in an
Account scoped way?
ie. I want several accounts each to have their own sets of tags to tag
their own articles rather than sharing a giant pool of tags.
Or perhaps there is a better solution than ActsAsTaggableOn?
Thanks!
--
MVC, DRY, convention over configuration. Those are important concepts in
rails. However, in a presentation a lenghtly talk about these things are
probably going to be pretty boring. And its not something that student
programmers may apprechiate as much as experienced programmers.
I would spend
I think it makes most sence to have a stock field in the database,
instead of having one record per stock item.
how to pass such nonmodel html/javascript fields from view
to rails and then back to the view
You mean non database fields, right?
Add this to the model:
attr_accessor
On 22 March 2010 22:16, Mike Montagne li...@ruby-forum.com wrote:
Colin Law wrote:
In the case of MySql I believe that the length of a varchar only
specifies the maximum length, it does not affect the actual space used
in the db as the data is stored as variable length records. I don't
know
Seems a little odd what you are doing however to answer your question:
You can add a text_field_tag or a select_tag to your form
http://api.rubyonrails.org/classes/ActionView/Helpers/FormTagHelper.html#M001731
e.g.
%=text_field_tag :quantity%
You can then get that via params[:quantity] in
If it is going to be read-only, why do you need to display it in a
text_area instead of directly on the page?
andrew wrote:
There is what I'm doing: I want to display a series of text_area
fields (read only) of which each has a checkbox.
Is this the best way to do it?
% form_for
On 23 March 2010 02:15, Craig White craigwh...@azapple.com wrote:
On Tue, 2010-03-23 at 03:02 +0100, Tony Tony wrote:
Craig White wrote:
I would have a table called pricing and have a column that had the
customer_id and thus you might have 2 (or more) prices for an item but
only one for a
From the script/console:
$ script/console
Loading development environment (Rails 2.3.5)
/Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning:
Gem::Dependency#version_requirements is deprecated and will be removed
on or after August 2010. Use #requirement
On 22 March 2010 22:32, RichardOnRails
richarddummymailbox58...@uscomputergurus.com wrote:
Hi Colin,
I still don't have subversion not git working.
Well the answer to that problem is obvious.
Colin
But I pretty sure that
http://www.pastie.org/881730 presents it all: three aspects of new
hi saljamil
and its children. I used named scopes in the model to pass the user_id
from controller and get back data specific to that user (his org and
children orgs). Send me an email if you need some code examples.
I would like to get some code examples. Please send your mailid.
My
Don't know if this is any use - but you could just upload it yourself
(rather than using paperclip or file_column):
http://www.tutorialspoint.com/ruby-on-rails/rails-file-uploading.htm
You can choose the directory that you want it saved in, then delete the
file as soon as you are done with it.
Sorry just to add that tutorial saves it in a model - but obviously you
don't need to do that.
--
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
On 22 March 2010 14:11, Justin soniknewme...@gmail.com wrote:
I didn't know about www-data, but your suggestion still didn't work. I
rebooted the server completely. I still get the blank logs. Also, I
still get the correct Welcome Aboard page, but when I click About
your application's
On 23 March 2010 09:57, Michael Pavling pavl...@gmail.com wrote:
On 22 March 2010 14:11, Justin soniknewme...@gmail.com wrote:
I didn't know about www-data, but your suggestion still didn't work.
I just checked a server I have here (Ubuntu 9.04LTS) and the directory
ownership is slightly
It's hard for us to help you with the associations when you arent
describing what you're trying to make. Im gonna try to guess based on
what you've given:
This is going to be a web shop with products related to cooking. A
bunch of products (in this case ingredients) can be put together as a
On 23 March 2010 05:27, Andy andy.bo...@gmail.com wrote:
Hello,
I'm stuck on some associations that I think may be more complex than I
originally anticipated. Not really straightforward stuff for my first
Rails app so if you have a chance to point me in the right direction I
would really
that worked but now I'm getting
require_frameworks': no such file to load -- openssl (RuntimeError)
when I try to run Webrick.
From what I'm reading, I need to install openssl-dev but since this is a
hosting server, I don't have access to a package handler so I contacted
web support.
Do you
On 23 March 2010 11:30, jackster the jackle li...@ruby-forum.com wrote:
that worked but now I'm getting
What worked? If you trim the whole previous message, no one knows what
you're replying to...
require_frameworks': no such file to load -- openssl (RuntimeError)
when I try to run Webrick.
Hi, any hints anybody?
Or some references how could that be implemented?
Cheers.
--
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
comopasta Gr wrote:
Hi, any hints anybody?
Or some references how could that be implemented?
My guess is that you'll need to ask this on a forum more focused on OCR
and graphics processing. This question is not specific to Rails.
--
Posted via http://www.ruby-forum.com/.
--
You received
You are probably better of posting on the activescaffold group:
http://groups.google.com/group/activescaffold
Unfortunately their documentation site is down at the moment but I'm
pretty sure they describe how to do model associations in
activescaffold.
http://activescaffold.com/docs
To be
Of course! Thanks very much or your replies, I really appreciate it.
The app is an administrative tool, not a front end webstore. Sorry I
wasn't more clear upfront, Sharagoz. The user will need to be able to
create three types of items in the system via (nested model) forms:
MenuItems,
add_customer_data is called within purchase to process its options
hash. My question is in reference to the line that processes the email
key: Why on earth does it, after checking to see if the email entry
exists, set customer_email explicitly to false?
No idea, probably either it was
On 23 March 2010 12:58, Andy andy.bo...@gmail.com wrote:
Of course! Thanks very much or your replies, I really appreciate it.
The app is an administrative tool, not a front end webstore. Sorry I
wasn't more clear upfront, Sharagoz. The user will need to be able to
create three types of items
Hi,
I´m trying to write a regular expression to get the substring block
in:
module$block.item
I´ve reached the obvious /\$.*\./ witch returns $block. substring.
How do I get directly the block substring?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are
$ irb
module$block.item[/\$(.*?)\./, 1]
= block
Cheers,
Andy
--
Andy Jeffries
http://andyjeffries.co.uk/ #rubyonrails #mysql #jquery
Registered address: 64 Sish Lane, Stevenage, Herts, SG1 3LS
Company number: 5452840
On 23 March 2010 14:03, Marcio Machado li...@ruby-forum.com wrote:
That's my question! How do you do that.
% a.text % gives me this error:
NoMethodError in Sections#edit_acknowledgments
Showing app/views/sections/edit_acknowledgments.html.erb where line
#11 raised:
Thanks! -a
On Mar 23, 3:47 am, Sharagoz -- li...@ruby-forum.com wrote:
If it is going to be
Thanks that works! I was trying params[:find_dates] == nil,
params[:find_dates].blank?, params[:find_dates] == , but obviously
none of them worked.
Here's an sort of off-topic question how would I go about getting
format.csv { render :csv = @logs } to work? Rails gives a method not
found error.
On 23 March 2010 14:55, andrew andrew.ggro...@gmail.com wrote:
That's my question! How do you do that.
% a.text % gives me this error:
%=h a.text %
BTW, a is not a very helpful name for a block variable (or any
variable for that matter). Assuming you're not paying for your code by
the
On 23 March 2010 15:04, Civ2boss civ2b...@gmail.com wrote:
Thanks that works! I was trying params[:find_dates] == nil,
params[:find_dates] == nil is the same as params[:find_dates].nil?
Colin
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk
On Tue, 2010-03-23 at 08:53 +, Colin Law wrote:
On 23 March 2010 02:15, Craig White craigwh...@azapple.com wrote:
On Tue, 2010-03-23 at 03:02 +0100, Tony Tony wrote:
Craig White wrote:
I would have a table called pricing and have a column that had the
customer_id and thus you
On 23 March 2010 14:55, andrew andrew.ggro...@gmail.com wrote:
That's my question! How do you do that.
% a.text % gives me this error:
You want just
%= text %
or probably
%= h text % dependant on where text is coming from
Colin
NoMethodError in Sections#edit_acknowledgments
Showing
Well that's strange then, because it still gave me a unexpected nil
found error when I use that. Actually now that I think about it, I
might have been using it on params[:find_dates]['start_date(1i)']
instead of just the params[:find_dates].
On Tue, Mar 23, 2010 at 11:12 AM, Colin Law
On 23 March 2010 15:08, Craig White craigwh...@azapple.com wrote:
On Tue, 2010-03-23 at 08:53 +, Colin Law wrote:
On 23 March 2010 02:15, Craig White craigwh...@azapple.com wrote:
On Tue, 2010-03-23 at 03:02 +0100, Tony Tony wrote:
Craig White wrote:
I would have a table called
On 23 March 2010 15:20, Robin Ting civ2b...@gmail.com wrote:
Well that's strange then, because it still gave me a unexpected nil
found error when I use that. Actually now that I think about it, I
might have been using it on params[:find_dates]['start_date(1i)']
instead of just the
I'd like to delete some records before saving them. I ran this
experiment:
before_save :prune_lab_datas
def prune_lab_datas
lab_datas.each do |lab_data|
lab_data.destroy
end
raise lab_datas.to_yaml
end
But nothing seems to be deleted in the hash:
---
- id001
One way would be to just process the uploaded-file data from the
request as needed and not worry about saving or doing anything else
with the tmp-saved uploaded-file itself, something like:
### in ./app/models/uploadable_file.rb
class UploadableFile
### for use in testing:
def
Hi,
I did a number of test runs from the book Agile Web Development with
Rails, third edition, (chapter 14, Task T: Testing).
I use Netbeans 6.8 as IDE.
All the test output runs are missing the number of assertions. For example:
|Finished in 0,733 seconds.
5 tests, 0
how do I change the column in a table to allow null?
I have
change_column :docs, :orga,:null
in my migration file but I get an error:
Mysql::Error: You have an error in your SQL syntax; check the manual
that corresponds to your MySQL server version for the right syntax to
use near
Yeah thanks for the help!
By the way do you know how I can get the format.csv { render :csv =
@logs } part to work? I have tested it on an index page and that
works, but when I try it on this admin page it says it doesn't
understand the URL. I have set a direct path to the admin page instead
of
Actually, I had :null= true
On Mar 23, 5:01 pm, ES emsto...@gmail.com wrote:
how do I change the column in a table to allow null?
I have
change_column :docs, :orga, :null
in my migration file but I get an error:
Mysql::Error: You have an error in your SQL syntax; check the manual
On 23 March 2010 16:03, Robin Ting civ2b...@gmail.com wrote:
Yeah thanks for the help!
By the way do you know how I can get the format.csv { render :csv =
@logs } part to work? I have tested it on an index page and that
works, but when I try it on this admin page it says it doesn't
On 23 March 2010 16:11, ES emsto...@gmail.com wrote:
Actually, I had :null= true
On Mar 23, 5:01 pm, ES emsto...@gmail.com wrote:
how do I change the column in a table to allow null?
I have
change_column :docs, :orga, :null
If you check the docs for change_column you will see that
cool thanks
On Mar 23, 5:21 pm, Colin Law clan...@googlemail.com wrote:
On 23 March 2010 16:11, ES emsto...@gmail.com wrote:
Actually, I had :null= true
On Mar 23, 5:01 pm, ES emsto...@gmail.com wrote:
how do I change the column in a table to allow null?
I have
change_column
I don't, but I figure there must be a way to just have it in the
controllers. Oh well thanks, I'll start another thread.
On Tue, Mar 23, 2010 at 12:17 PM, Colin Law clan...@googlemail.com wrote:
On 23 March 2010 16:03, Robin Ting civ2b...@gmail.com wrote:
Yeah thanks for the help!
By the way
Ok, I'll clean up the variable names. Thanks! :)
However
%=h comment.txt % undefined method `text'
%= text % and %=h text % give undefined local variable or method
`text'
Neither of those ideas work. :(
On Mar 23, 10:14 am, Colin Law clan...@googlemail.com wrote:
On 23 March 2010
On 23 March 2010 16:31, Robin Ting civ2b...@gmail.com wrote:
I don't, but I figure there must be a way to just have it in the
controllers. Oh well thanks, I'll start another thread.
You don't what? It is best to insert your reply at the appropriate
point in the comment so that it is easier to
On 23 March 2010 16:35, andrew andrew.ggro...@gmail.com wrote:
Ok, I'll clean up the variable names. Thanks! :)
However
%=h comment.txt % undefined method `text'
%= text % and %=h text % give undefined local variable or method
`text'
Neither of those ideas work. :(
Well what *is*
I just installed Netbeans 6.7 on Ubuntu 9.4 and all seems to be OK,
except I get the following error when I try rake tasks:
Rails requires RubyGems = 1.3.2 (you have 1.3.1). Please `gem update
--system` and try again.
Thank you for any help
Viorel
--
You received this message because you are
On 23 March 2010 16:47, Viorel viorelvl...@gmail.com wrote:
I just installed Netbeans 6.7 on Ubuntu 9.4 and all seems to be OK,
except I get the following error when I try rake tasks:
If you're installing Netbeans, what's wrong with using the latest version (6.8)
Rails requires RubyGems =
On 23 March 2010 16:47, Viorel viorelvl...@gmail.com wrote:
I just installed Netbeans 6.7 on Ubuntu 9.4 and all seems to be OK,
except I get the following error when I try rake tasks:
Rails requires RubyGems = 1.3.2 (you have 1.3.1). Please `gem update
--system` and try again.
That should
This is a nested model form using to models: section and comment,
where section has many comments.
text is a field for comments
approval_boolean is a field for comments
I just want the field value for text to show up as a non-form-
element and approval_boolean to show as a check box form
Thanks very much for taking another look at my problem.
If you want to use RJS then you need
to use the block form of button_to_function
Here's the best my brain could come up with
%# = button_to_function(ShowList,
%page[vendor_droplist].toggle ) %
%= button_to_function(ShowList)
{
I made a popup within object1's form to show another form to create a
new document object to associate with object1. When I click the
submit button I want
1) the document object to be created
2) the popup to close
3) the value in the document title field to get added to the
document name field in
On 23 March 2010 17:01, andrew andrew.ggro...@gmail.com wrote:
A! a.class = formbuilder. I thought it was a Comments class.
Now I know what to look up I guess my question after all is there
any way to extract a data value from a field within a formbuilder?
(if I got my terminology
I'm migrating an old project (not Rails) over to Rails 3. I've been
using Sequel as my ORM and I'm quite happy with it. However, when I
add Sequel models to my app/model directory, they don't seem to load
on their own. Am I going to need to load them manually or do I need to
set some kind of
That's exactly what I was looking for!
THANK YOU!
And thanks for the insight.
-a
On Mar 23, 12:10 pm, Michael Pavling pavl...@gmail.com wrote:
On 23 March 2010 17:01, andrew andrew.ggro...@gmail.com wrote:
A! a.class = formbuilder. I thought it was a Comments class.
Now I know what
Well, ignore that.
Rails does autoloading quite a bit differently that I expected and it
appears my stuff is getting loaded. *grimace*
On Mar 23, 10:13 am, cult hero binarypala...@gmail.com wrote:
I'm migrating an old project (not Rails) over to Rails 3. I've been
using Sequel as my ORM and
Have an app using older version of Rails (2.3.2) that I need some
routing assistance with if anyone has a minute.
The app was originally designed to be purely html view, and an xml and
json api was hacked on. To keep it clean, we are now moving the first
version of the api (v1) under its own
I have a concrete table with an associated join table and I'm trying to
load up some test data but cannot seem to get the fixtures file correct.
The parent/child relationship works great but the fixtures fail to load.
Any help would be greatly appreciated.
Here is what I have...
#
I added some javascript to the create.html.erb template that opens in
the popup after the document form submits.
The javascript is supposed to close the popup and send the title of
the document back to the main page but it's not working. Anyone know
why?
this is what is in the create.html.erb
I have presently a render :json which modify the current page
if @request.save
format.html { redirect_to(@request) }
format.json { render :json = { :result = 'success', :request
= request_path(@request) } }
but I would like rather to redirect to an index page
I wrote
On Tue, Mar 23, 2010 at 12:43 PM, Colin Law clan...@googlemail.com wrote:
On 23 March 2010 16:31, Robin Ting civ2b...@gmail.com wrote:
I don't, but I figure there must be a way to just have it in the
controllers. Oh well thanks, I'll start another thread.
You don't what? It is best to insert
Michael,
Thanks SO much for helping me. I still haven't gotten the logs to
populate, even with root:www-data
No luck with your chown -R root:www-data testapp1
If restarted apache: /etc/init.d/apache2 restart
* Restarting web server apache2
... waiting...done.
My symbolic link:
$ cd
On 23 March 2010 19:38, Justin soniknewme...@gmail.com wrote:
Michael,
Thanks SO much for helping me. I still haven't gotten the logs to
populate, even with root:www-data
Justin,
I don't know what you're so impressed with me for... we've not sorted
your problem. And I'm afraid I pretty much
I have built a simple forum but am having difficult getting the topics
to display in the order of their latest reply.
The associations are as follows:
class Forum ActiveRecord::Base
has_many :topics, :order = sticky DESC, created_at DESC
has_many :replies, :through = :topics
class Topic
I still get the same errors when I did option 1
/home/darwin/Sites/music_library/vendor/plugins/scaffolding/lib/
scaffolding.rb:107:in `list'
/home/darwin/Sites/music_library/vendor/plugins/scaffolding/lib/
scaffolding.rb:95:in `index'
On 23 March 2010 18:05, David Ishmael li...@ruby-forum.com wrote:
I have a concrete table with an associated join table and I'm trying to
load up some test data but cannot seem to get the fixtures file correct.
The parent/child relationship works great but the fixtures fail to load.
Any help
On Tue, 2010-03-23 at 12:38 -0700, Justin wrote:
Michael,
Thanks SO much for helping me. I still haven't gotten the logs to
populate, even with root:www-data
No luck with your chown -R root:www-data testapp1
If restarted apache: /etc/init.d/apache2 restart
* Restarting web server
On 23 March 2010 20:14, dwhitekiss dwhitek...@gmail.com wrote:
I still get the same errors when I did option 1
The error you had before was, from your first post,
NoMethodError in AdminController#index
undefined method `scaffold' for AdminController:Class
Are you saying you still get that
Maybe you could use:
map.resources :buckets, :controller = 'v1/buckets' do |buckets|
buckets.resources :apples, :controller = 'v1/apples'
end
I know this is a bit more code than just using :has_many, but I don't think
:has_many lets you specify a different controller.
/Lasse
2010/3/23 gsw
On 3/23/2010 2:56 PM, DanC wrote:
I have built a simple forum but am having difficult getting the topics
to display in the order of their latest reply.
The associations are as follows:
class Forum ActiveRecord::Base
has_many :topics, :order = sticky DESC, created_at DESC
has_many
Hey everyone.
I'm a one person team and in the next month need to produce and deploy
an application. I've been playing with rails for a little over a year
now and recently deployed my first app as a private contract.
I'm now planning development on a start up company.
The app should be
Thanks Andy and ayupmeduck...
Yes, this was the issue (Sorry, I'm mostly a LAMP guy, this was
probably pretty obvious to Rails developers)... In our clean scripts
we were running a command to create a new Rails project before we
restored. I got rid of this and started with a clean folder and
Here is an example:
format.json { render :json = { :redirect = requests_url } }
and then on your client redirect like this:
if (json.redirect) {
window.location = json.redirect;
}
Also try http://www.google.com/search?q=json+redirect
Does this solve your problem?
/Lasse
2010/3/23
Has anyone been able to use searchlogic with has_many_polymorphs?
Are they compatible?
--
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-t...@googlegroups.com.
To unsubscribe from this group,
Hi i'm a beginner to ruby on rails and I am trying to start a tutorial
but having trouble making sure ruby is in the right place. When i use
the terminal and ask which ruby it comes back with /usr/bin/ whilst
I think i needs it to be in usr/local/bin but i don't know how to get
it there. There is
Lasse Bunk wrote:
Here is an example:
format.json { render :json = { :redirect = requests_url } }
and then on your client redirect like this:
if (json.redirect) {
window.location = json.redirect;
}
Also try http://www.google.com/search?q=json+redirect
Does this solve
On Tue, Mar 23, 2010 at 1:25 PM, Peter peterorp...@me.com wrote:
Hi i'm a beginner to ruby on rails and I am trying to start a tutorial
but having trouble making sure ruby is in the right place. When i use
the terminal and ask which ruby it comes back with /usr/bin/ whilst
I think i needs it
in my controller the create action is :
respond_to do |format|
if @request.save
flash[:notice] = 'Request was successfully created.'
format.html { redirect_to requests_url }
format.xml { render :xml = @request, :status = :created,
:location = @request }
No ideas?
On Mar 22, 7:42 pm, Fabio Kreusch fabi...@gmail.com wrote:
This is it (HAML):
#category-form
- form_for @category, :remote = true do |f|
%fieldset
%legend= t('activerecord.models.category')
%p
= f.label :name
%br
= f.text_field :name
@Luke: Thanks! Yeah, I saw that tutorial, too. But, also like you
said, it still saves it to a model, so I'd rather just let paperclip
handle all that. Thank you anyway though.
@Jeff: Thank you!
For full disclosure, I'm still a little bit of a noob to Rails (and
ruby) but I think I get more
Let's say I have:
map.resources :teams do |team|
team.resources :squads, :shallow = true
end
When I want to generate a form_for a squad, I need both the team and
squad for new/create, but only the squad for edit.
This means I need:
edit:
form_for(squad)
new:
form_for([team, squad])
Has anyone actually installed a plugin?
I have used
rails plugin install git://github.com/binarylogic/authlogic.git
I reacts too fast - doesn't complain but you can't find the plugin
anywhere.
I have seen people giving advice on rails 3 to use script/plugin
obviously they are
responding having
1 - 100 of 105 matches
Mail list logo