Hi,
yes, it's definitely the right file. It's a js-request, that uses the
returned code to fill a div.
Regards
sewid
--
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-talk@googlegroups.com.
Maybe you can see to it by simply changing the style of your edit div
from display:none to display:block using a simple javascript
function if you don't like using javascript libraries.
On 16 fév, 14:57, pepe p...@betterrpg.com wrote:
Lets ignore the 'editable' form part. In general how
On 16 February 2011 19:45, Julian Leviston jul...@coretech.net.au wrote:
Actually it's doing multiple field ordering... It's best to think of the
orders as compounding not replacing each other. Easiest to see if you have
two different cols rather than the same one... For example created_at
On 17 February 2011 00:53, Robert Pankowecki (rupert)
robert.pankowe...@gmail.com wrote:
If you want to change the order instead of adding another column to
ordering list then there is reorder() method which is however
deprecated in Rails 3.1 in favor of except(:order).order(new order
here)
Hi All,
Is it necessary to have a separate controller for each sub-menu and
sub-sub-menus.
I want the nav buttons of the main section and the sub-menu point to each
other, is this possible with rails partials ?
Is there any tutorial for sub-menus ?
Thanks Warm Regards,
--
You received this
On 17 February 2011 04:19, khoan huu.khoa.ngu...@gmail.com wrote:
Hi all,
I'd like to unindent a block of ERB specifically to combat the extra
spacing being added to content inside textarea by the browser. Is
there such a feature in ERB?
I shall denote indentation with underscores in the
I don't think so, have you tried it and checked the html (View Page
Source or similar in the browser). The line
__%= render 'unindented' %
says output underlines then render unindented. There is no way that
you can remove the underlines before the %= render %. However why
not just
To solve the indentation problem, don't indent the tags in your
templates. You may have to experiment, but the result should be what
you want.
With ERB I've found that I can have either nicely aligned templates,
or somewhat nicely aligned HTML output. I write somewhat because it
never seems to be
Hey there
Is it possible to intercept Action Cache to force it to use a
specified filename to save to or to load a specified cached file
that is different to the current one expected for the URL?
I guess this is some sort of extending of action cache but I
cannot find much in google :)
Hi guys, I'm trying to figure out how to chain together group and
select, two finder methods in ActiveRecord 3.x so I have this
model
class Cow ActiveRecord::Base
set_table_name :cows
belongs_to :farmer
end
with breed:string and milk_quantity:integer columns and in client
code:
result
HI,
I got this error when i am testing my rails application. I dont have the
table named 'instructions'. But it shows a error like ERROR: relation
instructions does not exist. Totally, I got same error for 64 tests as 64
errors.
I am using rails 3.0, Ruby 1.9.2, Netbeans 6.8.
PS: I didnt creat
Hi,
It doesnt show problem for other tables through schema. It shows problem for
instructions which created default by rails 3. Instructions is not a
table which come under schema of psql database- So, i am thinking that this
maynot be a migration issues or preparatory issue to psql. But,
Hi.
I would like to do code refactoring:
@beers = []
Beer.all.each do |beer|
unless @beers.find{|c| c.brand_id == beer.brand_id}
@beers beer
end
break if @beers.size 29
end
So I achieved this by writing scope (on PostgreSQL):
scope :with_unique_brand,
Hello,
I'm using send_data to retrieve binary (images) from the database.
It works fine, this is my controller :
@picture = Picture.find(params[:id])
@image = @picture.image_file
send_data (@image, :type = @picture.image_content_type, :filename =
@picture.image_file_name, :disposition =
Bingo!
No need for send_data in the first place.
This was all i needed, in the view: %=
image_tag(/pictures/#{@picture.id}, :alt = Image) %
Now the image displays inside a layout. Sweet.
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
On 17 Feb 2011, at 15:34, David Zhu wrote:
I'm using send_data to retrieve binary (images) from the database.
It works fine, this is my controller :
@picture = Picture.find(params[:id])
@image = @picture.image_file
send_data (@image, :type = @picture.image_content_type, :filename
=
I'm using exception_notifier to get an email when a 500 error occurs
in production. Lately I'm seeing a lot of nonsensical POSTs show up
that cause an InvalidAuthenticityToken error. All the fields contain
random characters. (For instance, search_title=BHQWTZpjGeb)
Is there a way to detect them
I'm new to ROR, so still getting used to the MVC syntax; but think I have a
simple example here that I hope someone can tell me what I'm doing wrong (
maybe help someone else by doing so):
All I'm trying to do is upload a CSV file, then parse each row of data in it
(the first how contains
On Feb 16, 2011, at 6:40 PM, Philip Hallstrom wrote:
On Feb 16, 2011, at 3:02 PM, Peter Bell wrote:
I have the following route:
get /places/:lat/:lng = api#places
When I go to /places/1/2 it works fine
When I try to go to /places/40.728601/-73.991972 (a useful lat/lng) I get a
Hi there
../view/trainings:
in my _form.html.erb I use a collection_select to get the id of a
worker from Worker-table.
%= collection_select(:worker, :id, @workers, :id, :first_name,
options ={:prompt = Select a worker}, :class =worker) %/div
The collection select shows correct, but
HI Paul,
On Thu, Feb 17, 2011 at 9:01 AM, paul p...@nines.org wrote:
I'm using exception_notifier to get an email when a 500 error occurs
in production. Lately I'm seeing a lot of nonsensical POSTs show up
that cause an InvalidAuthenticityToken error. All the fields contain
random characters.
2011/2/17 Bhasker Harihara harihara.bhas...@gmail.com
Hi All,
Is it necessary to have a separate controller for each sub-menu and
sub-sub-menus.
No, it' s not necessary . The issue of menus, sub-menu etc are graphical
layout that can be customized by CSS and HTML. suppose we have the
Le 17 février 2011 18:04:42 UTC+2, edmond.kachale
edmond.kach...@baobabhealth.org a écrit :
2011/2/17 Bhasker Harihara harihara.bhas...@gmail.com
Is there any tutorial for sub-menus ?
I haven't searched for one, but that is a wake up call for me to create one
for rails newbies!!
You
Thanks lot,its works well
--
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-talk@googlegroups.com.
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscr...@googlegroups.com.
On 17 February 2011 11:26, Jim Ruther Nill jvn...@gmail.com wrote:
I don't think so, have you tried it and checked the html (View Page
Source or similar in the browser). The line
__%= render 'unindented' %
says output underlines then render unindented. There is no way that
you can remove
On 17 February 2011 13:20, PalaniKannan K kpalanikan...@gmail.com wrote:
HI,
I got this error when i am testing my rails application. I dont have the
table named 'instructions'. But it shows a error like ERROR: relation
instructions does not exist. Totally, I got same error for 64 tests as 64
On 17 February 2011 13:34, PalaniKannan K kpalanikan...@gmail.com wrote:
Hi,
It doesnt show problem for other tables through schema. It shows problem for
instructions which created default by rails 3. Instructions is not a
table which come under schema of psql database
I don't understand what
On 17 February 2011 15:42, rogi patrik.kel...@googlemail.com wrote:
Hi there
../view/trainings:
in my _form.html.erb I use a collection_select to get the id of a
worker from Worker-table.
%= collection_select(:worker, :id, @workers, :id, :first_name,
options ={:prompt = Select a
Hi,
I have an issue with my implementation of a feature which need to use a
Model find statement to lookup values based on specific conditions:
Example:
I have a method called 'get_messages' which needs to get values from the
database depending on the called scope. So,
I ended up just commenting it out.
--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send
On 17 February 2011 17:49, Tom Johnson li...@ruby-forum.com wrote:
Hi,
I have an issue with my implementation of a feature which need to use a
Model find statement to lookup values based on specific conditions:
Example:
I have a method called 'get_messages' which needs to get values from
I have an existing restful rails application. I need to add a new API.
This new API will be used by SOAP client to access the application.
It will be really helpful if someone can guide me or point me to the
useful links.
After googling for few days I do know we can use actionwebservice gem
along
Hi Peter,
This works
get 'places/:lat/:lng' = 'places#index', :constraints = { :lat =
/-?[.\d]+/, :lng = /-?[.\d]+/ }
I think it's just that the regular expression must match the whole text, and
you were just missing the '+' at the end.
William
--
You received this message because you are
Actually, I already have rescue_action_in_public. That's how
exception_notifier sends the email.
But I just did a search and see a disturbing discussion:
https://rails.lighthouseapp.com/projects/8994/tickets/5444-rescue_action_in_public-no-longer-works
Anyway, it seems like
Hello all,
I'd like to figure out what version of RSpec is in this Rails' project's
vendor/plugins/ since they were frozen some time ago - I just don't
know when which became apparent when setting up a new dev box and
running tests using 'spec' has failures over-and-above running all tests
with
if i rendered in the controller
def index
@tips = Tip.all
respond_to do |format|
format.html # index.html.erb
format.js { render :nothing = true }
format.xml { render :xml = @tips }
end
end
the complete source, the view index, the index.js.erb and the
Never rendering
Started GET /tips for 127.0.0.1 at Thu Feb 17 14:38:15 -0600 2011
Processing by TipsController#index as HTML
Tip Load (0.6ms) SELECT `tips`.* FROM `tips`
Tiptag Load (0.3ms) SELECT `tiptags`.* FROM `tiptags` WHERE
(`tiptags`.tips_id = 37)
Tiptag Load (0.2ms) SELECT
Hello everyone, I want to make something very simple with the Facebook JS
SDK: The user would go to a picture's page on my app, click on a button,
then a pop-up would appear the user would login to Facebook and authorize
the app then a message would be posted to his wall. I *don't* want to make
This behaviour seems strange to me:
Rails 3.0.4
$ rake db:create
# = creates project_dev AND project_test databases
$ rake db:drop
# = only drops the project_dev database (as expected)
$ RAILS_ENV=test rake db:drop
# = this effectively drops the project_test database (as expected)
Seems in
I have the following three tables: user, role and project.
---
User
has_and_belongs_to_many :roles, :join_table = projects_roles_users
has_and_belongs_to_many :projects, :join_table =
projects_roles_users
Role
has_and_belongs_to_many :users, :join_table = projects_roles_users
Any clues anyone?
On Feb 17, 11:57 pm, rails.n...@gmail.com rails.n...@gmail.com
wrote:
Hey there
Is it possible to intercept Action Cache to force it to use a
specified filename to save to or to load a specified cached file
that is different to the current one expected for the URL?
I
im expecting
thata its gets execute
$(document).ready(function(){
alert('ox');
}
in the index.js.erb
On Thu, Feb 17, 2011 at 3:24 PM, Frederick Cheung
frederick.che...@gmail.com wrote:
On Feb 17, 8:31 pm, Lorenzo Brito Morales lorenzo.br...@gmail.com
wrote:
the complete source, the view
On Feb 16, 7:48 pm, Robert Pankowecki (rupert)
robert.pankowe...@gmail.com wrote:
Maybe try
set_primary_key 'ID'
instead of
set_primary_key 'id'
?
Robert Pankowecki
Thanks, Robert.
Doing
set_primary_key 'ID'
seems to work. So, now
irb ts = TableSchema.first
= #TableSchema ID:
Thanks! That helped..(.now on to the next bug...)
rick
--
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-talk@googlegroups.com.
To unsubscribe from this group, send email to
Should I simply do it some other way?
--
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-talk@googlegroups.com.
To unsubscribe from this group, send email to
the line
format.js {render :nothing = true}
renders, well, nothing. so it gives a blank page. if you want the action to
render
the corresponding template, remove the render function.
On Fri, Feb 18, 2011 at 5:34 AM, Lorenzo Brito Morales
lorenzo.br...@gmail.com wrote:
im expecting
thata
I guess the document for db:create need to be updated:
# activerecord/lib/active_record/railties/databases.rake#36
desc 'Create the database from config/database.yml for the current
Rails.env (use db:create:all to create all dbs in the config)'
task :create = :load_config do
# Make the
Interesting idea, but I'd ask the question, why would you want to do this? Is
there a real-world performance bottleneck your trying to fix that wouldn't be
addressed with the standard page, action or fragment caching ?
Luke
On 2011-02-17, at 1:31 PM, rails.n...@gmail.com wrote:
Any clues
I did something similar using an Observer to create the join object.
The reason for this was that I needed to create a join when either one
side was created or the other side was. So in one Observer, I could
watch both models, and respond to either one.
Walter
On Feb 17, 2011, at 6:21 PM,
Why doesn't this phone validation work?
validates_format_of :phone, :with = /^\([0-9]{3}\)[-. ]?[0-9]{3}[-.
]?[0-9]{4}|^[0-9]{3}[-. ]?[0-9]{3}[-. ]?[0-9]{4}$/,
:message = is not a phone number
tested with (123) 456 7890
testing it here does work: http://www.rubular.com/
I need multiple cached versions of one page (/url) . tracked in
memcache. and I want to directly dump a page cache based on a
condition
Yes I know there are better ways to do this in rails. but I have
bad architecture to work with
So a light wrapper around Action Cache would be super
I have Xcode 3.0+ installed
Ruby 1.9.2
And a direct dmg for mysql
$ sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql
Password:
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
52 matches
Mail list logo